フィルターのクリア

How can I get the central frequency out of a fft?

15 ビュー (過去 30 日間)
Leo Dokoza
Leo Dokoza 2020 年 7 月 13 日
コメント済み: Leo Dokoza 2020 年 7 月 19 日
For an analysis I have the following script. Everything is fine and working. My Prof now wants to know the central frequeny out of the fft.
How di I get the central frequency?
Fs= 1.9* 10^6 ; %sampling frequency
T = 1/Fs; %sampling period
L = 15000 ; %time in ms
t= (0: L-1) * T; %time vector
% load holz.mat
ti= fliese90cm.time;
a= fliese90cm.ampli;
plot(ti,a)
y=fft(a);
P2 = abs( y /L );
P1 = P2 (1: L /2+1);
P1(2: end-1)=2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
plot(f,P1)
xlim([0 2*10^5])
title ( 'FFT Fliese, 100 cm')
xlabel('Frequency [Hz]')
ylabel('Amplitude [V]')
% stem(f,P1)
Q=trapz(f,P1);
  5 件のコメント
Image Analyst
Image Analyst 2020 年 7 月 15 日
OK, so it's the center frequency of the spectrum signal within some particular frequency band. And is defined by the geometric mean of the starting frequency and ending frequency of that particular band.
So I guess you have the spectrum, and now you're needing to find the starting and ending frequency of some "hump" you see in the spectrum, right?
Did you see the answers below?
Leo Dokoza
Leo Dokoza 2020 年 7 月 19 日
Correct. After an analysis of some objects I have now different frequency spectrums. With the answers here I consider to take the max. and min. values of my spectrum and with them to calculate the center frequency

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2020 年 7 月 14 日
Not possible to run your code.
One option is to use islocalmax, specifically using 'FlatSelection','center'.
  1 件のコメント
dpb
dpb 2020 年 7 月 14 日
編集済み: dpb 2020 年 7 月 15 日
Or, alternatively, findpeaks optional 'widths' output with the 'WidthReference','halfheight' input named parameter option.
ADDENDUM:
Actually, findpeaks isn't as helpful as could be -- it returns the widths but not the locations of the reference-level crossings. There was another thread just a week or so ago on same issue--I showed there how to find the points.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by