Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Correct Power spectrum Density of Morlet wavelet

Status
Not open for further replies.

syedshan

Advanced Member level 1
Joined
Feb 27, 2012
Messages
463
Helped
27
Reputation
54
Reaction score
26
Trophy points
1,308
Location
Jeonju, South Korea
Activity points
5,134
Dear all,

Please refer to the following code to generate the morlet wavelet.

%close all; clc; clear all;
Fo=50; Fs=Fo*4;
x=-5:1/Fs:5;
for i=1:length(x)
wavelet(i) = exp(-x(i)^2/2)*cos(x(i)*Fo);
end
subplot(2,1,1); plot(wavelet);

%PSD
h=spectrum.welch;
subplot(2,1,2); psd(h,wavelet,'Fs',Fs)

I want to find the frequency component of the morlet signal, but could not do that.
Please see where am I getting wring.
I should get high amplitude of PSD at about 50Hz, but I am getting it at about 7 or 8 Hz.
morlet.png

Bests,
Shan

- - - Updated - - -

Hi all,

I figured it out.
There was one silly mistake, instead of "cos(x(i)*Fo" I should have written "cos(2*pi*x(i)*Fo)"

With this I get the correct response

Bests,
Shan
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top