find if a column vector contains at least element 1
3 views (last 30 days)
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
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)
2 Comments
See Also
Categories
Find more on Simulink Functions 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!