Fundamental doubt in Matlab. : Help

If I build a loop in Matlab, like
for i=1:4;
;
end;
What is the value of i after this loop has ended and is this values always guaranteed to be this?

Thanks in advance

Comments

  • Do this:

    for i = 1:3
    i
    end
    i

    and the result is
    i = 1
    i = 2
    i = 3
    i = 3

    Yes, the result is always that.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion