I have this matrix
A=[-1 -0.3313 0 1 0.55 -0.2186 -1.0041 -0.0297 0 0.0041 0 0.0297; 0 0 0 0 1.09 -0.09 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0.5 0.5; 0 0 0 0 0 0 0 0 0 0 -0.375 1.375; -1 0.2108 0 1 -0.35 0.1392 -0.9675 0.238 0 -0.0325 0 -0.238];
I want to find a rows that gives me maximum number of non zero element.
answer should be row=[1,5]
I use this one [~,Q1]=max(sum(A~=0,2) ) but it does not give [1,5]
Best Answer