octave-maintainers
[Top][All Lists]
Advanced

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

Re: Operations with int and single


From: Thorsten Liebig
Subject: Re: Operations with int and single
Date: Thu, 13 Sep 2012 12:01:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0

Am 13.09.2012 11:48, schrieb Israel Herraiz:
> Excerpts from Júlio Hoffimann's message of Thu Sep 13 11:36:57 +0200 2012:
>> Even if it was not intended, it's an extra bit of flexibility.
> Sure, I don't even understand why it's possible to operate with int
> and double, but not with different classes of int (after all, if
> doubles are automatically to int in these operations, why not other
> ints too?).
>
>> Although GNU Octave aims to be compatible with MATLAB, it doesn't need to
>> copy all the bad ideas.
> Sure again, but as far as I can tell, MATLAB-compatibility is one of
> the goals of Octave. I don't think Octave behavior is "bad" at all, I
> was just curious because it's different to MATLAB.
>
> If the behavior is intended, maybe the operation could raise a
> warning, saying that it is not MATLAB compatible (as other operations
> do).
>
> Cheers,
> Israel
>

I think the goal is that any Matlab code should run in Octave.
But the other way around is not the goal I suppose. There are a lot of things 
Octave can, but Matlab does not.
So I like it that Octave is smarter than Matlab when it comes to this "mixed 
int-operations"...

Example:
linspace(0,2*pi)(1:end-1)

try it in Octave and Matlab...




reply via email to

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