help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Understanding a dot


From: Søren Hauberg
Subject: Understanding a dot
Date: Sun, 09 Mar 2008 13:20:01 +0100

Hi all,
  By accident I've just typed a dot instead of a semi-colon in a
for-loop. This didn't produce an error, as I would have expected. Here's
an example:

  octave:15> tmp = rand(1,3)
  octave:16> for i = 1.length(tmp), i, endfor
  ans =  3
  i =  1

I don't understand this code. It seems to behave just like

  length(tmp), for i = 1, i, endfor

but I don't understand the syntax. Can anybody explain this syntax to
me?

Søren



reply via email to

[Prev in Thread] Current Thread [Next in Thread]