Path: news.mathworks.com!not-for-mail
From: "Matt Fig" <spamanon@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Conversion of Columns into Decimals
Date: Sat, 8 Dec 2007 02:07:16 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 20
Message-ID: <fjcu8k$mcp$1@fred.mathworks.com>
References: <fjcsag$t98$1@fred.mathworks.com>
Reply-To: "Matt Fig" <spamanon@yahoo.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1197079636 22937 172.30.248.35 (8 Dec 2007 02:07:16 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 8 Dec 2007 02:07:16 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:441516


"alan dinno" <alan_dinno@hotmail.com> wrote in message
<fjcsag$t98$1@fred.mathworks.com>...
> Hi - If matrix A contains only bits,I want a row vector B 
> (with same length as size(A,2)) that contains the 
> conversion of each column in A into Decimal.
> 
> Example:
> 
>  A =[ 1 1 0 1 0
>       0 0 1 1 1
>       1 1 1 0 1
>       1 0 0 1 1 ]
> 
>  B=[bin2dec(A col 1),bin2dec(A col 2),bin2dec(A col 3),...]
> 
> Thanks
> alan


B = bin2dec(num2str(A'))'