fft doesnt work for me
显示 更早的评论
good morning i am a student first year in collage. i want to analyze signals for a project using fft but for some reason the plot looks weird of the hz spectrum a very high spikes occuer at 0hz and the end of the plot causing very narrow plot. here is the code and the signal file and the plot.
clear all
xls=xlsread('signals'); %importing the excel file
xlsz=size(xls); %size of the xls
xlr=xlsz(1); %number of rows
m=1000000;% scaling factor of time (Micro)
t=1/m*xls(2:xlr,1)';
%%
signum=5; %the signal number
y=xls(2:xlr,signum+1);
%%
x=fft(y);%fourier transform
f=(0:length(x)-1)*m/length(x); % detecting the range of for frequancy
plot(f,abs(x))

please help thank you
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Discrete Fourier and Cosine Transforms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

