help-octave
[Top][All Lists]
Advanced

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

Re: nested functions?


From: Mike Miller
Subject: Re: nested functions?
Date: Tue, 18 Feb 2014 17:39:07 -0500

On Tue, Feb 18, 2014 at 16:28:35 -0500, Benjamin Abbott wrote:
> Matlab doesn't support function functions defined at the command line or in 
> scripts (only in function files)

Ah yes, thanks Ben. So there is no Matlab compatibility to compare
with here, having a script that defines a function at all is an Octave
extension.

So back to your original script Vic, the strict answer is that your
script is not compatible with Matlab, therefore your use of nested
functions in that way is not supported :)

However, I notice that functions defined at the command line in Octave
*do* support nested functions. So if you eval or paste the contents of
the script at the command line, it should work. So a case could still
be made for supporting nested functions in Octave everywhere that
ordinary functions are supported.

-- 
mike


reply via email to

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