Mismatched plot when editing the x-axis
Ältere Kommentare anzeigen
This is the code I ued when opening a plot in matlab command from simulink.
plot(out.x(:,1), out.x(:,2), out.x(:,1), out.x(:,3), out.x(:,1), out.x(:,4))

The x-axis runs from 0-100, which I want to change to 1960:1.49:2060
I used
timedata=1960:1.49:2060;
so that they cover the same length.
plot(timedata, out.x(:,2), timedata, out.x(:,3), timedata, out.x(:,4));
I am not sure why there is a difference between the two graph? There shouldn't be apart from the x-axis.

2 Kommentare
Ameer Hamza
am 6 Apr. 2020
Can you share the variable 'out' in a .mat file?
Light_traveller
am 6 Apr. 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Signal Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!