Path: news.mathworks.com!not-for-mail
From: "Abhijit Bhattacharjee" <abhattac@mathworks.com>
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$1@newscl01ah.mathworks.com>
References: <jfs98r$r2a$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: ah-abhattac.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="UTF-8";
	reply-type=response
Content-Transfer-Encoding: 7bit
X-Trace: newscl01ah.mathworks.com 1327609679 11074 172.31.91.152 (26 Jan 2012 20:27:59 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 26 Jan 2012 20:27:59 +0000 (UTC)
In-Reply-To: <jfs98r$r2a$1@newscl01ah.mathworks.com>
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: news.mathworks.com comp.soft-sys.matlab:755886

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


"Mohannad " <msm36@aub.edu.lb> wrote in message 
news:jfs98r$r2a$1@newscl01ah.mathworks.com...
> 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.