Plotting vector with different time starting value on x axes?

hello everyone,
I would like to plot 4 different lines that they're starting at different value on x-axes:
The first start a 0
the second and the third at 20
the last at 901
the total length of the x axes is about 2768 (days)
How can i do all these in one plot?
Thanks everyone, happy 2016

3 件のコメント

Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2016 年 1 月 5 日
check for hold on command
Daniele
Daniele 2016 年 1 月 5 日
thanks! i'll look now!
Daniele
Daniele 2016 年 1 月 5 日
sorry, but how does it works? i used hold on only for put together different plots, but not for tell to a single plot where to start in the x axes. thanks

サインインしてコメントする。

 採用された回答

Stephen23
Stephen23 2016 年 1 月 5 日
編集済み: Stephen23 2016 年 1 月 5 日

0 投票

Why not just read the plot documentation? You simply need to supply all X and Y vectors:
>> x1 = 0:10;
>> y1 = x1.^2;
>> x2 = 4:8;
>> y2 = x2.^3;
>> plot(x1,y1,x2,y2)

1 件のコメント

Daniele
Daniele 2016 年 1 月 5 日
thanks very much, i'm discovering matlab now!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange2-D and 3-D Plots についてさらに検索

質問済み:

2016 年 1 月 5 日

コメント済み:

2016 年 1 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by