Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

[SOLVED] Correct Power spectrum Density of Morlet wavelet

Status
Not open for further replies.

syedshan

Advanced Member level 1
Joined
Feb 27, 2012
Messages
468
Helped
27
Reputation
54
Reaction score
27
Trophy points
1,308
Location
Jeonju, South Korea
Activity points
5,136
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top