MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   信号是否周期性?使用MATLAB函数可能吗? (https://www.labfans.com/bbs/showthread.php?t=24099)

poster 2019-12-10 20:48

信号是否周期性?使用MATLAB函数可能吗?
 
使用MATLAB函数简要解释信号(非)周期性的原因

像等周期(信号)...

这样的事吗?



[B]回答:[/B]

[URL="http://www.mathworks.com/help/techdoc/ref/fft.html"]fft[/URL]可以做到:

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');

[url=https://stackoverflow.com/questions/4142222]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 23:16

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.