Let's explained with an example if I have h =
0 1 2 3 1 0 0 0 5 0 1 0
there is any function that will return the number of nonzero elements per row something like c =
3 1 2but without a loop. I know I can use nnz per rowsomething like for i=1: numRows c(i)=nnz(h(i,:));endbut there is any way to do it without a loop?I will really appreciate any suggestions
Best Answer