fft doesnt work for me
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Discrete Fourier and Cosine Transforms en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

