フィルターのクリア

Is there FWHM function in frequency domain

6 ビュー (過去 30 日間)
Erkan
Erkan 2021 年 5 月 10 日
コメント済み: Star Strider 2022 年 8 月 6 日
Hi all, i have a gaussian pulse in time domain, Can i find the fwhm in frequency domain of this pulse? In andvanced thanks

採用された回答

Star Strider
Star Strider 2021 年 5 月 10 日
Try it —
a = 2;
p = @(t) exp(-(a*t).^2)
p = function_handle with value:
@(t)exp(-(a*t).^2)
t = linspace(-5,5);
figure
plot(t, p(t))
grid
P = fft(p(t))/numel(t);
Ts = t(2)-t(1);
Fs = 1/Ts;
Fn = Fs/2;
Fv2 = linspace(-Fn, Fn, numel(P));
figure
plot(Fv2, fftshift(abs(P)))
grid
xlabel('Frequency')
figure
findpeaks(fftshift(abs(P)), Fv2, 'Annotate','extents')
[pks,locs,w,p] = findpeaks(fftshift(abs(P)), Fv2, 'MinPeakProminence',0.01)
pks = 0.0877
locs = 0.0500
w = 1.0726
p = 0.0877
So, yes, using findpeaks.
  4 件のコメント
zahra
zahra 2022 年 8 月 6 日
Hello, dear Star Strider
This part of the code written by you is as follows:
Fn = Fs/2;
Fv2 = linspace(-Fn, Fn, number(P));
I don't understand why it is fs/2? Please explain to me the reason.
Thank you
Star Strider
Star Strider 2022 年 8 月 6 日
The Nyquist frequency, ‘Fn’, (the highest frequency that can be uniquely resolved in a sampled signal) is one-half the sampling frequency, ‘Fs’.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by