[Top][All Lists]

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

Re: matlab compatibility

From: John Eaton
Subject: Re: matlab compatibility
Date: Sun, 27 Feb 94 16:22:00 CST

Constantine Kiriakopoulos <address@hidden> wrote:

: I just installed octave on my computer (486DX running linux), in order to 
: avoid using matlab, still most of the functions I'm using are from matlab
: so, I'm trying to find a way to make these libraries work with octave. 
: Specifically :

:   nargins (a matlab variable containing the number of used parameters in
:            a function does not exist in octave)

Are you sure you don't mean `nargin'?  Octave and Matlab both have
this built-in variable.

:   hold    (a command in matlab does not exist either)

I think this would be tough to add given Octave's use of gnuplot for
graphics, but if someone can come up with a clean way to do this, I
will install the change.

:   grid    (which is a matlab command, in octave is a function, meaning
:            that its argument has to be in a parenthesis)

Matlab will also accept `grid ('on')' or `grid ('off')'.

I'm fairly certain that this was the only syntax that worked with
earlier versions of Matlab.

It probably now works as a `command' with Matlab because Matlab 4.x
can convert any statement like

  foo bar baz


  foo ('bar', 'baz')

automatically.  This is a nice feature, because it allows users to add
functions that can be called without using parentheses.

Modifying Octave to do the same would certainly be possible, but would
probably require some significant changes to the parser, so I haven't
bothered to do it.


reply via email to

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