Borrar filtros
Borrar filtros

FFT and plot amplitude spectrum

2 visualizaciones (últimos 30 días)
Samaneh Arzpeima
Samaneh Arzpeima el 6 de Dic. de 2018
Comentada: Shubham Gupta el 10 de Dic. de 2018
hello everybody
I got stuck on this problem and really need your help
I must plot the amplitude spectrum of a data set. my data set is the attached “momentrate.mat”. The first column is ‘time(s)’ and the second one is ‘momentrate(Nm/s)’.these 2 columns give a plot like the left figure in attached pdf
now I need to take the amplitude spectrum of the above plot, and it should be something like the right figure in attached pdf file.
I tried the following codes
sample_frequency= numel(t)/(t(end)-t(1))
but this won't give me anything like what I suppose to have.
Can you please tell me what is wrong?
I would appreciate if you could explain to me with simple codes.

Respuesta aceptada

Shubham Gupta
Shubham Gupta el 7 de Dic. de 2018
You might wanna use "logarithmic plot" instead of simple plot. So last line would be
  2 comentarios
Samaneh Arzpeima
Samaneh Arzpeima el 7 de Dic. de 2018
yes! loglog sounds about right.Thank you so much.
Do you mind if I ask another question,
the figure looks really different when I use different numbers for FFT
nfft=1024; %length of FFT
nfft=length(x); %this one will give me 101
which do you think would be okey? I also found a
Shubham Gupta
Shubham Gupta el 10 de Dic. de 2018
You can give it a read, I hope it helps.

Iniciar sesión para comentar.

Más respuestas (0)


Más información sobre Spectral Measurements en Help Center y File Exchange.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by