MatLab,我如何在彼此之上绘制多个波?

时间:2012-08-21 23:45:54

标签: matlab plot wave

我从用户Li-aung Yip那里拍摄了这张照片:Is there a way to do a linear best fit from one point to another in a matrix multiple times in order to detrend a series, MatLab?

enter image description here

我想知道几个时间序列MatLab如何做到这一点。

最佳, 阿比德

2 个答案:

答案 0 :(得分:5)

假设原始图(红色,绿色,黑色,蓝色)是变量a,b,c,d,每个变量都有t个点:

figure;
hold on
plot(t,c,'-k'); %# black line
plot(t,c+b,'-g'); %# green line added to previous
plot(t,c+b+a,'-r'); %# red line added to previous
plot(t,c+b+a+d,'-b'); %# blue line added to previous

答案 1 :(得分:0)

如果x是您的日期向量,B是您的黑线,

plot(x,A) % the NR plot
hold on
plot(x,B,'k')
plot(x,C+B,'g')
plot(x,D+B,'r')    
hline(1.2)
hline(1.0)