poster
2019-12-10, 20:48
使用MATLAB函数简要解释信号(非)周期性的原因
像等周期(信号)...
这样的事吗?
回答:
fft (http://www.mathworks.com/help/techdoc/ref/fft.html)可以做到:
Y = fft(signal); periodLength = 'second'; %or whatever units your signal was acquired in. N = length(Y); Y(1) = []; power = abs(Y(1:floor(N/2))).^2; nyquist = 1/2; freq = (1:floor(N/2))/floor(N/2)*nyquist; figure; plot(freq,power) grid on xlabel(['cycles/' periodLength]); title('Frequency plot'); 这就是每个周期的周期数。
period = 1./freq; figure; plot(period,power) grid on ylabel('Power') xlabel(['Period (' periodLength 's/Cycle)']); title('Period Plot');
更多&回答... (https://stackoverflow.com/questions/4142222)
像等周期(信号)...
这样的事吗?
回答:
fft (http://www.mathworks.com/help/techdoc/ref/fft.html)可以做到:
Y = fft(signal); periodLength = 'second'; %or whatever units your signal was acquired in. N = length(Y); Y(1) = []; power = abs(Y(1:floor(N/2))).^2; nyquist = 1/2; freq = (1:floor(N/2))/floor(N/2)*nyquist; figure; plot(freq,power) grid on xlabel(['cycles/' periodLength]); title('Frequency plot'); 这就是每个周期的周期数。
period = 1./freq; figure; plot(period,power) grid on ylabel('Power') xlabel(['Period (' periodLength 's/Cycle)']); title('Period Plot');
更多&回答... (https://stackoverflow.com/questions/4142222)