MATLAB Answers

Is there FWHM function in frequency domain

조회 수: 4(최근 30일)
Erkan 2021년 5월 10일
댓글: Star Strider 2021년 5월 10일
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 = linspace(-5,5);
plot(t, p(t))
P = fft(p(t))/numel(t);
Ts = t(2)-t(1);
Fs = 1/Ts;
Fn = Fs/2;
Fv2 = linspace(-Fn, Fn, numel(P));
plot(Fv2, fftshift(abs(P)))
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.
  댓글 수: 2
Star Strider
Star Strider 2021년 5월 10일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by