I have matchcounts (5×5)cell, every cell has a vector of double [106×1]. The vectors of double have zeros and non zero values. I want to find non zero values for every cell, count them and put the result in a matrix. I tried with this code:
a{i,j}(k,1)=[];for k=1:106 for i=1:5 for j=1:5 if (matchcounts{i,j}(k,1))~=0 a{i,j}=a{i,j}(k,1)+1; end end endendend
and others but it's not correct! Can you help me? Thanks Example: matchcounts(,1)(k,1) have 30 no zero values, the code have to count this no zero values and put 30 in the matrix in position (1,1): A(1,1)=30.
Best Answer