X-Received: by with SMTP id bu13mr18811678qab.2.1356769808605;
        Sat, 29 Dec 2012 00:30:08 -0800 (PST)
 Dec 2012 00:30:08 -0800 (PST)
Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!ee4no3650192qab.0!news-out.google.com!k2ni3151qap.0!nntp.google.com!ee4no3739628qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.soft-sys.matlab
Date: Sat, 29 Dec 2012 00:30:08 -0800 (PST)
In-Reply-To: <kbbcug$f6k$1@newscl01ah.mathworks.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=; posting-account=Rk_PYwoAAACUgHy5tdjB8T8hY4rWL42b
References: <ee1244b1-d379-41d6-81e4-2d7360332aa5@googlegroups.com> <kbbcug$f6k$1@newscl01ah.mathworks.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a9d2b38d-b045-4b0e-b90f-915a7dca59f1@googlegroups.com>
Subject: Re: reshape?
From: hadi motamedi <motamedi24@gmail.com>
Cc: Roger Stafford <ellieandrogerxyzzy@mindspring.com.invalid>
Injection-Date: Sat, 29 Dec 2012 08:30:08 +0000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Lines: 55
Xref: news.mathworks.com comp.soft-sys.matlab:785570

On Tuesday, December 25, 2012 8:48:08 AM UTC+3:30, Roger Stafford wrote:
> hadi motamedi <motamedi24@gmail.com> wrote in message <ee1244b1-d379-41d6-81e4-2d7360332aa5@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(y-min(y)))*(y-min(y));
> > ->n=4;
> > ->y1=floor(2^n*x);
> > ->b1=de2bi(y1,'left-msb');
> > ->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^n-1.  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 :
And it was successful. Thank you for your help