How can I plot two irregular time series in one plot?

I have to irregular time series (in the sense that observations to not occur at the same time) and want to plot them in one plot using one x-axis. Is that possible?

 採用された回答

Mischa Kim
Mischa Kim 2014 年 2 月 20 日

0 投票

Sure, see for example:
x1 = 0:pi/10:3*pi;
x2 = 0:2:20;
y1 = sin(x1);
y2 = rand(length(x2),1);
plot(x1,y1,x2,y2)

1 件のコメント

Florian
Florian 2014 年 2 月 20 日
thanks a lot. I was thinking of creating timeseries objects etc, but did not think of this easy solution. Thanks a lot again...

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

その他の回答 (0 件)

カテゴリ

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

製品

質問済み:

2014 年 2 月 20 日

コメント済み:

2014 年 2 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by