loop step size for MATLAB

1

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
    
asked by anonymous 01.11.2018 / 22:15

2 answers

1

The loop control works with

A= inicio:passo:final;

In your case

for x=0.15:0.15:10
...

Solve the problem.

    
01.11.2018 / 22:56
0

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

    
02.11.2018 / 23:28