I have
A = {1;[];1;[]};B = [1;4;10;4];
I want to check equality of each row in the cell to the each row in the array and find the index. I use this code, but it is not correct.
temp = zeros(length(B),1);for i=1:length(B) if isempty(A{i})==0 temp(i) = find(isequal(A{i},B(i))); else temp(i) = 0; endend
result should be
temp =[1;0;0;0]
Best Answer