MATLAB: For-Loop Increment

238 Views Asked by At

I'm trying to use a for-loop in matlab where there is an increment of 0.1, 0.01, 0.001, etc., but I don't understand how to that.

I've tried something like this:

for i = 0.1: "step" : 10^-10

% do something

end

I don't know what to put in "step." Can someone explain if there's a way for me to solve this?

1

There are 1 best solutions below

0
On BEST ANSWER
for i = 10.^[1:-1:-5] disp(i); end

works perfectly in displaying

 10
 1
 0.10000
 0.010000
 0.0010000
 0.00010000
 0.000010000