如何在同一y轴内用不同的采样率和线条样式绘制时间序列?

时间:2016-09-01 15:14:53

标签: matlab plot

考虑以下示例。两个y轴之间的线型和位置要求在注释中。

Fs1 = 5;
Fs2 = 25;
t1 = (0:1:19)/Fs1;
t2 = (0:1:19)/Fs2;

fc = 5;
y11 = sin(2*pi*fc*t1); % In left y axis with style 'o' | legend entry - 'raw signal'
y12 = 2*sin(2*pi*fc*t2); % In left y axis with style '--' | legend entry - 'upsampled signal'

y21 = 5; % In right y axis with style ':' | legend entry - 'DC'

0 个答案:

没有答案