Hi,all. could you please tell me how to find the column number of first zero element of each row. eg. for the matrix in the picture, I want the output will be outputmatrix=[3;4;4;5;5;6;6;6;6;6;1;1;1;1;1]. Thank you!
MATLAB: How to find the column number of first zero element of each row
matrix manipulationvectorization
Related Question
- Matrix or array composed by zero-values
- Matrix Indices Problem
- Function: Compare each Element of 2 Matrix for zero and non-zero
- Finding a max in a column and making all other elements equal to zero
- Find the number of rows and column of non-zero number(1st)
- How to count identical elements in a non-symmetrical matrix
Best Answer