Finding a value and call the cell number or counting value on the same length of vectors.
1 view (last 30 days)
Show older comments
I'd like to call the row number when B(i,1)==1;
For i=1:n;
if B(i,1)==1;
(strfind is only for 1 row.) how to call the row and column number ?
or
for i=1:n;
if B(i,1)=1; % when B(i,1)==1, how to count 1 value and add 1
like
1 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1
1 0 0 0 2 0 0 3 0 0 0 0 4 0 0 0 0 0 0 5 0 0 0 0 0 6 0 0 0 0 7 ..
Thank you so much.
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Multidimensional Arrays 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!