hello Mike
this is it
please check if the display of j is in the inner our the outer loop
x3 = [5, 4, -3, -2]
j = 4
for ci = 1:length(x3)
if x3(ci) > 0
j = j +1;
disp(j)
end
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!