The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: While a cell in an array isn't zeros
Replies: 2   Last Post: Jan 27, 2012 11:29 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 16
Registered: 11/18/11
Re: While a cell in an array isn't zeros
Posted: Jan 27, 2012 11:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I didn't completely understand the structure of your cells, but you could try with :
while sum(system{3,5}(:) == 0) < 3*n
% your code

while sum(system{3,5}(:) < 1e-10) < 3*n
% your code

Good luck!

"Mohannad" wrote in message <jfs98r$r2a$>...
> 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.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.