can any one tell me how the break functions if there are two if conditions in a for loop …
if true % code
endlocs_Qwave=[ 100 150 90 1175 1 50]';locs_Rwave=[116 170]';q=0 k=1for j=k:size(locs_Rwave) for i=1:numel(locs_Qwave) if (i== numel(locs_Qwave)) q=[q locs_Qwave(i)]; break; end if( locs_Qwave(i)>locs_Rwave(j)) q=[q locs_Qwave(i-1)]; break; end end
end
Best Answer