Path: news.mathworks.com!not-for-mail
From: "Ulrik Nash" <uwn@sam.sdu.dk>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Locating matrix column that meets certain criteria
Date: Fri, 17 Sep 2010 16:15:22 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 18
Message-ID: <i7046q$n9t$1@fred.mathworks.com>
References: <i703p5$p47$1@fred.mathworks.com>
Reply-To: "Ulrik Nash" <uwn@sam.sdu.dk>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1284740122 23869 172.30.248.35 (17 Sep 2010 16:15:22 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 17 Sep 2010 16:15:22 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2106050
Xref: news.mathworks.com comp.soft-sys.matlab:670941

"Ulrik Nash" <uwn@sam.sdu.dk> wrote in message <i703p5$p47$1@fred.mathworks.com>...
> Hi Everyone,
> 
> Suppose I have a matrix A:
> 
> A = [0 0 1 0 1 1;0 0 1 1 1 1]
> 
> Now I wish to find that column, which not only contains all ones, but also contains no columns on its right that hold zeros. So in this case, the solution would be 5.
> 
> Any suggestions how I can do this neatly?
> 
> Regards,
> 
> Ulrik.



Should read, "but also HAS no columns on its right that hold zeros".