Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
i need a explanation in one command

Subject: i need a explanation in one command

From: manojkiran tembireddy

Date: 28 Apr, 2011 22:08:05

Message: 1 of 2

t=0:(1/400):0.3;
%f=input('Enter the frequency=');
b=sin(2*pi*50*t);
b(102:202)=0;
title('Flicker occured signal')
l_s = length(b);
[cA1,cD1] = dwt(b,'db5');

then after again i am using a wavedec command.

[C,L] = wavedec(b,5,'db5');
 % extract the level 3 approximation coefficients
cA3 = appcoef(C,L,'db5',3);
%To extract the levels 3, 2, and 1 detail coefficients from C,
cD3 = detcoef(C,L,3);
cD2 = detcoef(C,L,2);
cD1 = detcoef(C,L,1);

i already got the values by using dwt then again why i am using wavedec to get the right values. can anyone help me explaining this steps to me.

Subject: i need a explanation in one command

From: Florin Neacsu

Date: 29 Apr, 2011 18:23:05

Message: 2 of 2

"manojkiran tembireddy" <manojkiran1287@gmail.com> wrote in message <ipcog5$ctr$1@fred.mathworks.com>...
> t=0:(1/400):0.3;
> %f=input('Enter the frequency=');
> b=sin(2*pi*50*t);
> b(102:202)=0;
> title('Flicker occured signal')
> l_s = length(b);
> [cA1,cD1] = dwt(b,'db5');
>
> then after again i am using a wavedec command.
>
> [C,L] = wavedec(b,5,'db5');
> % extract the level 3 approximation coefficients
> cA3 = appcoef(C,L,'db5',3);
> %To extract the levels 3, 2, and 1 detail coefficients from C,
> cD3 = detcoef(C,L,3);
> cD2 = detcoef(C,L,2);
> cD1 = detcoef(C,L,1);
>
> i already got the values by using dwt then again why i am using wavedec to get the right values. can anyone help me explaining this steps to me.


Hello,

> i already got the values by using dwt then again why i am using wavedec to get the right values. can anyone help me explaining this steps to me.

If you wrote this you should know why. If you didn't write it maybe you should have a look at the documentation for dwt and wavedec. It is very much self-explanatory:
>The dwt command performs a single-level one-dimensional wavelet decomposition
>wavedec performs a multilevel one-dimensional wavelet analysis

Regards,
Florin

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us