octave-maintainers
[Top][All Lists]
Advanced

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

Re: The fabled "Matlab compatibility"


From: Daniel Carrera
Subject: Re: The fabled "Matlab compatibility"
Date: Fri, 9 Nov 2012 09:33:38 +0100

On 9 November 2012 08:34, c. <address@hidden> wrote:

Personally I'd also add:

5) A very simple C++ API that allows to embed the Octave interpreter in your own stand-alone application
(That's obviusly a "corollary" of being Free)

6) Broadcasting allows to write very clean code doing complex stuff with N-d arrays

When I first saw broadcasting it looked very interesting, but then I noticed that if I accidentally add a column vector and a row vector, I would get a matrix instead of an error.  I have provisionally set Octave-UPM to give me a warning:


>> u = [1 2 3 4]
u =
        1        2        3        4

>> u' + u
warning: operator +: automatic broadcasting operation applied
ans =

        2        3        4        5
        3        4        5        6
        4        5        6        7
        5        6        7        8


So it seems to me that broadcasting would make it harder to catch some errors. I think that if it had been up to me, I would have designed this feature differently. But who knows. With enough time I might decide that Octave's way to do it is better after all.

Cheers,
Daniel.

reply via email to

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