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
0 件のコメント
回答 (1 件)
KSSV
2019 年 2 月 27 日
Note that max gives you the index of the max value also.
[aa_max,idx] = max(aa)
3 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spectral Measurements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!