MATLAB: For-Loop Increment
Mia Lopez
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?
$\endgroup$ 11 Answer
$\begingroup$for i = 10.^[1:-1:-5] disp(i); endworks perfectly in displaying
10 1 0.10000 0.010000 0.0010000 0.00010000 0.000010000 $\endgroup$