×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

help:how to check whether a matrix is empty or not

help:how to check whether a matrix is empty or not

help:how to check whether a matrix is empty or not

(OP)
suppose i have a while in my program and i want that to run till an one dimensional array q is empty

how to use this condition

RE: help:how to check whether a matrix is empty or not

From your question it sounds like you are probably doing something fairly simple in a very inefficient manner.  However,

help isempty

RE: help:how to check whether a matrix is empty or not

(OP)
how is that inefficient ,

its an algorithm where i have to run a while loop till an array is not empty

and i found this isempty already before u replied,

but u r really helpfull replying to all of my messages

thanks a lot for that

RE: help:how to check whether a matrix is empty or not

Quote:

how is that inefficient

The word "loop" normally means that whatever it is you are doing, you are not making use of Matlab's fantastic vectorization capabilities.  In general, loops work well for small datasets, but don't scale well.  Similarly growing and shrinking matrices.  And from your lmited problem description, it sounds like are combining the two.

I didn't mean to offend.  Sorry if I inadvertently have.

RE: help:how to check whether a matrix is empty or not

What you do mean by "empty?"  

Are you zeroing the values in the array as you process?

If so, why aren't you using a FOR loop?

TTFN



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources