how can i find the value for the amplitude and frequency using fft?

1 次查看(过去 30 天)
Hi everyone,
please i want to find the value for the maximum amplitude and the frequency. i used the abs of the fft for the amplitude but the amplitude value i am having does not tally with that from the figure (from the figure is around 2-2.2 while am having from the fft 8900). also, i used several methods from this page for the frequency value but its returning with a vector not value. The oscillations have no sampling frequency, so i used fs = 1/T.
Time = 0.2-0.3ms %the vector values= 250000x1 double
% to find the amplitude
p=signal
pt=signal time
t1=0.2
t2=0.3
pttt=find(pt>ti&pt<t2)
a=fft(pt(pttt))
aa=abs(a)
aa_max=max(aa) % it will give value of 8900
% to find the frequency value
f=find(aa==aa_max)
f_exst=(f(1,1)-1)*fs/N % but am not sure of the value it gives
Please i need your help
thanks

回答(1 个)

KSSV
KSSV 2019-2-27
Note that max gives you the index of the max value also.
[aa_max,idx] = max(aa)
  3 个评论
Abba Alhaji Bala
Abba Alhaji Bala 2019-2-28
I use this code to extract
>>[aa_max,idx] = max(aa)
>>faa = max(aa);
>>f_exst=(faa(1,1)-1)*fs/N;
i dont know if this is how you mean i can extract the frequency
Thanks,

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by