How to plot a data set with shift in axis?

1 Ansicht (letzte 30 Tage)
Fred
Fred am 5 Mär. 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

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 5 Mär. 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)

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by