On Tuesday, December 25, 2012 8:48:08 AM UTC+3:30, Roger Stafford wrote:
> hadi motamedi <motamedi24@gmail.com> wrote in message <ee1244b1d37941d681e42d7360332aa5@googlegroups.com>...
>
> > Dear All
>
> > To send a speech wave signal through a noisy channel , I tried as :
>
> > >[y,Fs]=wavread('speech.wav');
>
> > >x=(0.999/(max(ymin(y)))*(ymin(y));
>
> > >n=4;
>
> > >y1=floor(2^n*x);
>
> > >b1=de2bi(y1,'leftmsb');
>
> > >b11=reshape(b1.',numel(b1),1);
>
> > To this end, I have the original data in binary form suitable to send through a noisy channel. The matrix [y1] contains the digits and the matrix [b11] contains the bits to be sent through the noisy channel. Please consider the matrix [b11p] to be the received noisy binary data . Can you please let me know how can I convert it back to the digits to be able to play the noisy wave sound?
>
> > Thank you
>
>         
>
> I am a somewhat puzzled by your question. Being able to convert the noisy bits back to integers depends very much on b11p not having lost or gained bits along the way and thereby affecting the way the bits are clustered in groups of n bits each. If you haven't lost phasing in this manner, reversing your procedure by reshaping b11p to restore the n columns of bits and this time using bi2de, would get you back to a noisy version of y1  that is, integers between 0 and 2^n1. Note that altering bits toward the most significant end of a group would have a serious effect on these restored integers. However, there is clearly no way to restore the original x, much less the y, values unless you have more information than is possessed by b11p.
>
>
>
> Roger Stafford
Thank you for your reply
I tried as :
>b11P=reshape(b11p.',4,100000);
>b1s=b11P.';
>y1t=bi2de(b1s,'leftmsb');
>x1f=(2^(n))*y1t;
>wavplay(x1f,Fs)
And it was successful. Thank you for your help
