How to Calculate Vertical Wavelength

조회 수: 1 (최근 30일)
TTA
TTA 2020년 3월 5일
댓글: Star Strider 2020년 3월 6일
Hi,
In the attached file "Signal" I have three (3) columns of signals. Please I want to calculate the wavelength?. The dt is 0.02 km. the data ranges from 20 to 40 km.
thanks

채택된 답변

Star Strider
Star Strider 2020년 3월 5일
This should get you started:
D = load('Signal.txt');
dt = 0.02;
L = size(D,1);
t = linspace(0, 1, L)*dt;
Fs = 1/dt;
Fn = Fs/2;
FTD = fft(D - mean(D))/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn;
Iv = 1:numel(Fv);
[Amax,idx] = max(abs(FTD(Iv,:))*2);
FreqAtMaxAmplitude = Fv(idx)
figure
subplot(3,1,1)
plot(Fv, abs(FTD(Iv,1))*2)
xlim([0 5])
grid
subplot(3,1,2)
plot(Fv, abs(FTD(Iv,2))*2)
grid
xlim([0 5])
subplot(3,1,3)
plot(Fv, abs(FTD(Iv,3))*2)
grid
xlim([0 5])
The wavelength is the propagation velocity divided by the frequency in radians/time unit. The ‘FreqAtMaxAmplitude’ gives the frequencies of the peaks in Hz, so multiply these by to get the radian frequencies. You will then have to provide the propagation velocity in order to calculate the wavelength:
lambda = propagation_velocity ./ (2*pi*FreqAtMaxAmplitude)
  댓글 수: 4
TTA
TTA 2020년 3월 6일
Thank you very much. I really appreciate
Star Strider
Star Strider 2020년 3월 6일
As always, my pleasure!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by