MATLAB: I want the number of rows that have bigger than 0 or 1

non-zerosoverall numberrows

For example i have the matrix A=[2 3 1; 4 7 6; 1 9 1; 1 0 1] and i want the overall number of the rows that have bigger than 1 price. To this exammple the number i should get is 3,because the max price of the last row is 1.

Best Answer

Is this what you look for
length(find(max(A,[],2)>1))
ans =
3