help-octave
[Top][All Lists]
Advanced

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

Re: Understanding a dot


From: Søren Hauberg
Subject: Re: Understanding a dot
Date: Mon, 24 Mar 2008 10:55:21 +0100

man, 24 03 2008 kl. 10:47 +0100, skrev Kim Hansen:
> I guess 1. is read by the same code that would read 1.0, the code
> could be reformated as:
>   for i = 1.
>       length(tmp)
>       i
>   endfor
Yeah, okay, that kinda makes a little bit of sense (not much though).
What really bugs me is that
  i = 1.length(tmp)
gives an error (like expected), but
  for i = 1.length(tmp) ...
doesn't. This is perfectly compatible with Matlab, but it is a really
weird thing to do IMHO.

> How does Matlab handle decimal points without any decimals after them?
>> 1.

ans =

     1

Octave does the same thing.

Søren



reply via email to

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