How do I plot one timeseries vs another from the command line?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jason Nicholson
le 16 Déc 2013
Réponse apportée : Tamas Majoros
le 15 Août 2018
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 commentaires
Réponse acceptée
Azzi Abdelmalek
le 16 Déc 2013
t=-10:0.1:10;
x=sin(t);
y=cos(t)
plot(x,y)
2 commentaires
Jason Nicholson
le 16 Déc 2013
Modifié(e) : Azzi Abdelmalek
le 16 Déc 2013
Azzi Abdelmalek
le 16 Déc 2013
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)
Plus de réponses (1)
Tamas Majoros
le 15 Août 2018
Nice thing about timeseries is the built-in utility methods:
[xTs,yTs] = synchronize(xTs,yTs,'Union'); plot(xTs.Data,yTs.Data)
0 commentaires
Voir également
Catégories
En savoir plus sur Time Series dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!