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:
can someone pls debug the code.....

Subject: can someone pls debug the code.....

From: jenson joseph

Date: 21 Jan, 2011 09:37:46

Message: 1 of 4

clc;
close all;
clear all;
load noisdopp;
x = noisdopp;
wp = wpdec(x,2,'db1');
cfs= read(wp,'allcfs');
A1 = cfs2wpt('db1',[1 1024],[3 4 5 6],2,cfs); %some problem with the 3rd parameter
a1 = wpcoef(A1,[1 0]);
plot(A1);

Subject: can someone pls debug the code.....

From: Krishna Kumar

Date: 21 Jan, 2011 09:45:05

Message: 2 of 4

jenson joseph <jensonjoseph16@gmail.com> wrote in message <b5c8f477-c3dd-4603-b4b4-28dc70b559e1@glegroupsg2000goo.googlegroups.com>...
> clc;
> close all;
> clear all;
> load noisdopp;
> x = noisdopp;
> wp = wpdec(x,2,'db1');
> cfs= read(wp,'allcfs');
> A1 = cfs2wpt('db1',[1 1024],[3 4 5 6],2,cfs); %some problem with the 3rd parameter
> a1 = wpcoef(A1,[1 0]);
> plot(A1);
make this change .it is running
 A1 = cfs2wpt('db1',[1 1024],[3 4 5 6],2,cfs); %some problem with the 3rd
to
 A1 = cfs2wpt('db1',[1 1024],[3 4 5 6]',2,cfs); %some problem with the 3rd .

Subject: can someone pls debug the code.....

From: Wayne King

Date: 21 Jan, 2011 12:14:04

Message: 3 of 4

jenson joseph <jensonjoseph16@gmail.com> wrote in message <b5c8f477-c3dd-4603-b4b4-28dc70b559e1@glegroupsg2000goo.googlegroups.com>...
> clc;
> close all;
> clear all;
> load noisdopp;
> x = noisdopp;
> wp = wpdec(x,2,'db1');
> cfs= read(wp,'allcfs');
> A1 = cfs2wpt('db1',[1 1024],[3 4 5 6],2,cfs); %some problem with the 3rd parameter
> a1 = wpcoef(A1,[1 0]);
> plot(A1);

Why do you even need this?

A1 = cfs2wpt('db1',[1 1024],[3 4 5 6],2,cfs); %some problem with the 3rd parameter

You've already constructed the wavelet packet tree with wpdec(). You haven't modified the coefficients at all, so there's no need to put the coefficients into another wavelet packet tree. You can simply read the coefficients from wp (your tree) instead of from A1.

Wayne

Subject: can someone pls debug the code.....

From: chaitu4matlab

Date: 22 Jan, 2011 04:42:19

Message: 4 of 4

On Jan 21, 4:14 am, "Wayne King" <wmkin...@gmail.com> wrote:
> jenson joseph <jensonjosep...@gmail.com> wrote in message <b5c8f477-c3dd-4603-b4b4-28dc70b55...@glegroupsg2000goo.googlegroups.com>...
> > clc;
> > close all;
> > clear all;
> > load noisdopp;
> > x = noisdopp;
> > wp = wpdec(x,2,'db1');
> > cfs= read(wp,'allcfs');
> > A1 = cfs2wpt('db1',[1 1024],[3 4 5 6],2,cfs); %some problem with the 3rd parameter
> > a1 = wpcoef(A1,[1 0]);
> > plot(A1);
>
> Why do you even need this?
>
> A1 = cfs2wpt('db1',[1 1024],[3 4 5 6],2,cfs); %some problem with the 3rd parameter
>
> You've already constructed the wavelet packet tree with wpdec(). You haven't modified the coefficients at all, so there's no need to put the coefficients into another wavelet packet tree. You can simply read the coefficients from wp (your tree) instead of from A1.
>
> Wayne

to wayne

the above command will be useful when we want to construct a tree if
we were give the vector matrix(coeff's).
and one more thing there is no command to find Discrete Wavelet
Tree(DWT).
then this command will be useful after finding coeff's using
'wavedec()'

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