2 parts – 1st: create a loop that goes up by 5 from 12 until 50 2nd: change the loop when the variable is greater than 31 the numbers go up by 3.
I've attempted:
for i=12:5:50
if i>31
disp(i(i=numel(i):3:50))
end
end
and:
j=12:3:50;
for i=12:5:numel(j)
if i>31
disp(i(j))
end
end
and so many other variations .. I've been on the question for hours and feel as though I'm about to go insane.. Please help!!
Best Answer