I have the following loop in MATLAB, I would like to know how to make my variable k be incremented from 0.15 by 0.15 until it reaches 10.
for k=1:1:10
%...
end
I have the following loop in MATLAB, I would like to know how to make my variable k be incremented from 0.15 by 0.15 until it reaches 10.
for k=1:1:10
%...
end
The loop control works with
A= inicio:passo:final;
In your case
for x=0.15:0.15:10
...
Solve the problem.
Hello, in this case the increment (step) should be 0.15 and not 1 as suggested in the example. Then do the following:
for k = 1: 0.15: 10% k = start: increment / decrement: end
%...
end