How do I plot one timeseries vs another from the command line?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have two timeseries. I want to plot them vs each other in an XY plot. Is this possible to do this like in the tstool "XY Plots" option? I want to do this from the command line and not from tstool.
댓글 수: 0
채택된 답변
Azzi Abdelmalek
2013년 12월 16일
t=-10:0.1:10;
x=sin(t);
y=cos(t)
plot(x,y)
댓글 수: 2
Azzi Abdelmalek
2013년 12월 16일
t=-10:0.1:10;
x=sin(t);
y=cos(t);
xx = timeseries(x,t);
yy = timeseries(y,t);
x1=squeeze(xx.data);
y1=squeeze(yy.data);
plot(x1,y1)
추가 답변 (1개)
Tamas Majoros
2018년 8월 15일
Nice thing about timeseries is the built-in utility methods:
[xTs,yTs] = synchronize(xTs,yTs,'Union'); plot(xTs.Data,yTs.Data)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Time Series에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!