find if a column vector contains at least element 1
Show older comments
I have to check if column vector has at least element 1. Does Matlab have such similar function or I have to build it myself?
3 Comments
Daniel Shub
on 20 Sep 2012
Do you mean isempty
Salvatore Mazzarino
on 20 Sep 2012
Daniel Shub
on 20 Sep 2012
Edited: Daniel Shub
on 20 Sep 2012
So do you mean any? It would help if you gave a couple of example vectors and what you expect.
Accepted Answer
More Answers (1)
Azzi Abdelmalek
on 20 Sep 2012
Edited: Azzi Abdelmalek
on 20 Sep 2012
length(a)
Or
numel(a)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!