Shifting a graph without altering the data itself.
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I have the following graph in which I'd like the two curves to coincide as closely as possible. Is there a way to achieve that without altering the data? Also, simply shifting the x data within the plot function by a certain offset (i.e. plot(x+offset,y)) doesn't yield the desired result.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/159179/image.jpeg)
Below is the plotting:
figure
subplot(2,1,1)
plot(k,RCS_PO,'k',k,RCS_MOM_soft,'m',k,RCS_MIE_soft,'b','LineWidth',2);
0 Kommentare
Antworten (1)
Star Strider
am 22 Dez. 2016
6 Kommentare
Star Strider
am 22 Dez. 2016
For that, I would choose a subset of your data (for example 4 to 8 ka) and use the delay calculated from that. You would insert a zero or NaN vector the length of the delay returned as the third argument of alignsignals to your signal vector, and use linspace to extend your independent (probably time) vector to the appropriate length.
Siehe auch
Kategorien
Mehr zu Spectral Measurements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!