Path: news.mathworks.com!not-for-mail
From: "Ariel Krieger" <srigi001@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: EVAL within EVAL
Date: Mon, 2 Nov 2009 03:19:01 +0000 (UTC)
Organization: New York University
Lines: 23
Message-ID: <hclj35$kh4$1@fred.mathworks.com>
References: <hclda3$slq$1@fred.mathworks.com> <f94955c1-38ae-48ba-a617-984604e29e1a@j11g2000vbi.googlegroups.com>
Reply-To: "Ariel Krieger" <srigi001@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257131941 21028 172.30.248.37 (2 Nov 2009 03:19:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 2 Nov 2009 03:19:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1889337
Xref: news.mathworks.com comp.soft-sys.matlab:581717


ImageAnalyst <imageanalyst@mailinator.com> wrote in message <f94955c1-38ae-48ba-a617-984604e29e1a@j11g2000vbi.googlegroups.com>...
> Why do it that strange way?  Why not simply do
> x = ones(10, 100);
> x = x * 3;
> or even
> x = 3 * ones(10, 100)
> 
> That way you're not going against the recommendations of section 4.6
> of the FAQ:
> http://matlabwiki.mathworks.com/MATLAB_FAQ

sorry the example I gave was extremely dumb, that's not what I want to do it was just an easy way to explain my intentions. I'll try to be more coherent:

Let's say I have 100 matrices N1, N2, ... N100
now, with a loop I'd like to remove all the zero rows from them.
for one matrix this would be done pretty easily:
N1(~any(N1,2),:) = [];

how would I go about doing that for all the Ns?

hope I'm more clear,

thanks