How to plot a data set with shift in axis?

1 visualización (últimos 30 días)
Fred
Fred el 5 de Mzo. de 2013
Hi, I am trying to plot two data set in a figure Y1 starts from x=1 to x=100 but Y2 starts from x=50 to 100. How can I plot Y2 from 50 (with a shift of 50 values)? Thanks

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 5 de Mzo. de 2013
close
x1=1:100
y1=sin(0.1*x1);
x2=50:100;
y2=cos(.2*x2)
plot(x1,y1);
hold all
plot(x2,y2)

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by