octave-maintainers
[Top][All Lists]
Advanced

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

new matlab features


From: John W. Eaton
Subject: new matlab features
Date: Thu, 11 Mar 2004 15:08:55 -0600

The documentation and release notes for the next release of Matlab are
now available on the MathWorks web site.  There doesn't seem to be an
obvious link from the front page, but you can start here

  http://www.mathworks.com/products/R14_prerelease.shtml

and find the docs and release notes (this link was posted to
comp.soft-sys.matlab).

Some interesting and weird changes in there.

One that is not too bad is the new block comment syntax:

  %{
    this is a multi-line
    comment
  %}

One that is tricky is nested functions.  This seems likely to cause
confusion with subfunctions.  Now if you write

  function foo (args)
    function bar (args)
      function baz (args)
      end
    end
  end

in a .m-file, the functions are nested.  Omit the "end" tokens that
match the "function" tokens and you have subfunctions.  As I
understand it, nested functions have access to the variables in the
symbol table of the parent, but subfunctions do not.  Different 
semantics for nearly the same syntax looks like trouble to me.  Ugh.
I remember debating this idea when I implemented subfunctions a year
or so ago and the consensus seemed to be that we should avoid the
potential confusion...

Another one that is just weird and limited is the new anonymous
function:

  fcn_handle = @ ( args ) expr ;

(I assume that only one expression can appear, and that there is no
way to return multiple values).  Hmm.

I'm sure that it won't be too long (weeks?) before we see messages
wondering why some of the new features are not already available in
Octave...

jwe



reply via email to

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