你只说了“根据信号的幅度值来调整采样频率”,但究竟采样频率胡差和信号幅值之间具体是什么关系?
代码如下,供参考:
clear S T
T(1)=0;
i = 1;
while 1
S(i) = 5 * sin( 2 * pi * T(i) / 1000 );
if T(i) > 1000, break, end
i = i + 1;
dT = 20 / (abs(S(i-1)) + 1);
T(i) = T(i-1) + dT;
end
S1 = abs(S) >= 1;
plot(T, S)
hold on
stem(T, S1)
则旅
结果图孙做凳形: