tk = 1;trk = { [1;1], [1;1], [1;1], [1;1], [0;0], [0;0], [0;0]};las =[];if isempty(las) las = [0;0]; for roll = 7:1 las = cell2mat(trk{tk,roll}); if (las(1,1) ~= 0) || (las(2,1) ~= 0) break end endend
OUTPUT
las = 0 0 roll = []
Best Answer