From: mahmud_dbm on 14 Feb 2010 09:53 Sir and one more thing, if i would have used wavedec, which returns the decomposition structure and coefficients, with the low- and high-pass decomposition filters you specify and i'm getting coefficients there and i am able to reconstruct my signal, no problem with that.. so i need to have the same kind of coefficients for packet too, to reconstruct, or i should ask you the difference between wavedec and wpdec.. i couldn't understand from doc help... :((
From: Wayne King on 14 Feb 2010 11:00 "mahmud_dbm " <mahmud_dbm(a)yahoo.com> wrote in message <hl92oe$at7$1(a)fred.mathworks.com>... > Sir and one more thing, if i would have used wavedec, which returns the decomposition structure and coefficients, with the low- and high-pass decomposition filters you specify and i'm getting coefficients there and i am able to reconstruct my signal, no problem with that.. so i need to have the same kind of coefficients for packet too, to reconstruct, > > or i should ask you the difference between wavedec and wpdec.. i couldn't understand from doc help... :(( wavedec gives you a wavelet decomposition, where only the lowpass output is subdivided further into low and high pass parts. A wavelet packet decomposition divides both the lowpass and highpass outputs at each resolution level. You can use wprec() to reconstruct your signal For example: % Create a wavelet packets tree. x = rand(1,512); t = wpdec(x,3,'db3'); t = wpjoin(t,[4;5]); % Write values. sNod = read(t,'sizes',[4,5]); cfs4 = zeros(sNod(1,:)); cfs5 = zeros(sNod(2,:)); t = write(t,'cfs',4,cfs4,'cfs',5,cfs5); % reconstruct signal with two nodes zero-ed out. y = wprec(t); Wayne
From: mahmud_dbm on 15 Feb 2010 01:24 Dear Sir, Thank you once again to be with me, Sir, what i am planning to do is, i will have these 512 binary Bits at Transmitter and will pass them through any channel, at the Receiver i will reconstruct them.. this is all i'm planning to do. from Tx output.. i cant send This "Tree" over any channel, so i need to have the total coefficients of all the nodes of final level decomposition. (like we get a single coeff sequence using wavedec) > % Create a wavelet packets tree. > x = rand(1,512); > t = wpdec(x,3,'db3'); > t = wpjoin(t,[4;5]); % Still it is a Tree Sir.. :(( after decomposing where do i get all the coefficients of last level of decomposition, so that i can send them over any channel. I cant send any tree over any channel, say Awgn.. so i did something like this.. clear all;close all;clc EbN0=1:10; for i=1:length(EbN0) ip = randint(1,128); mbit=pskmod(ip,2); T = wpdec(mbit,3,'db3'); T = wpjoin(T,[4;5]); noise_bit=awgn(T,EbN0(i)); % This is an Error, because I Cant Pass This Tree here, i need to pass decomposed Hi & Low pass co-efficients only, and if wprec(T) requires a Tree to get the binary signal back then at the receiver end i need to reconstruct this Tree from Coefficients. not from the Tree we got from the Transmitter side itself, because we "couldn't transmit Tree through the channel" % Write values. sNod = read(T,'sizes',[4;5]); cfs4 = zeros(sNod(1,:)); cfs5 = zeros(sNod(2,:)); T = write(T,'cfs',4,cfs4,'cfs',5,cfs5); % reconstruct signal with two nodes zero-ed out. y = wprec(T); op=pskdemod(y,2); [num ber(i)]=biterr(ip,op); end semilogy(EbN0, ber); grid on; I Guess i'm in Trouble, but using wavedec i could get the coefficients pretty easily like ip = randint(1,128); mbit=pskmod(ip,2); % Modulation [wbit,l] = wavedec(mbit,2,'haar'); % Low pass Decomposition, and This wbit is Total Coefficients and we are allowed % to pass it through any channel. like nbit=awgn(wbit,EbN0(i)); % Noise addition rbit = waverec(nbit,l,'haar'); % Reconstruction using Coeff % No Problem here.. Sir i tried to explain my problem my level best, Thank you.. to read this history.. now i hope you can solve it, as i know the problem and u know the solution to it.
From: mahmud_dbm on 15 Feb 2010 12:20 Dear Sir, Can i use something like this, here i am getting the exact result, but i'm not sure if it is doing the same as i wanted.. ip = randint(1,512); mbit=pskmod(ip,2); T = wpdec(mbit,2,'haar'); % all the coeffs cfs = read(T,'allcfs'); % cfs to tree T2 = cfs2wpt('haar',N,tnodes(T),2,cfs); rbit=wprec(T2); dmod=pskdemod(rbit,2); It is working fine, cudn't understand properly everything, really thank you sir to be with me ..
From: Wayne King on 15 Feb 2010 14:07 "mahmud_dbm " <mahmud_dbm(a)yahoo.com> wrote in message <hlbvo4$o9h$1(a)fred.mathworks.com>... > Dear Sir, > > Can i use something like this, here i am getting the exact result, but i'm not sure if it is doing the same as i wanted.. > > ip = randint(1,512); > mbit=pskmod(ip,2); > T = wpdec(mbit,2,'haar'); > > % all the coeffs > cfs = read(T,'allcfs'); > > % cfs to tree > T2 = cfs2wpt('haar',N,tnodes(T),2,cfs); > rbit=wprec(T2); > dmod=pskdemod(rbit,2); > > It is working fine, cudn't understand properly everything, > really thank you sir to be with me .. Hi, yes, I told you several times, you have to use wprec() to reconstruct the signal from the WP transform. Wayne
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Image capture problems -- PLEASE HELP Next: Division of positive integers |