From: "Abhijit Bhattacharjee" <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: While a cell in an array isn't zeros
Date: Thu, 26 Jan 2012 15:27:58 -0500
Organization: MathWorks
Lines: 15
Message-ID: <jfsd0f$aq2$>
References: <jfs98r$r2a$>
Mime-Version: 1.0
Content-Type: text/plain;
Content-Transfer-Encoding: 7bit
X-Trace: 1327609679 11074 (26 Jan 2012 20:27:59 GMT)
NNTP-Posting-Date: Thu, 26 Jan 2012 20:27:59 +0000 (UTC)
In-Reply-To: <jfs98r$r2a$>
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
Xref: comp.soft-sys.matlab:755886

You may try using nnz(), which counts the number of nonzero elements in an 

"Mohannad " <> wrote in message 
> I'm very close to finishing this project and I just run into this one 
> problem, I have an array of 3 rows and m columns called system. and m gets 
> larger at each iteration of the code.
> I just need to know who can I specify in the while statement that I want 
> the code to keep running as long as the the cell system{3,m} IS NOT all 
> zeros? this cell is a n by 3 matrix representing forces.
> Or  some small value such as 1e-10 might be more appropriate.
> Thank.