handlers error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

handlers error

ali_khan
Hello,

I have encountered an error...


Startin f = 1.000000e+03
error: handles to nested functions are not yet supported
error: called from
    solve at line 368 column 24
    impedance at line 188 column 23
    Example at line 37 column 3
error: evaluating argument list element number 1
error: called from
    solve at line 368 column 24
    impedance at line 188 column 23
    Example at line 37 column 3


My line 368 of solve function is:


[Im0, ~,residual,it] = gmres(@PMZMT,Vm0,[],1e-6,200);

where PZMT is a function constructed by me


Can someone help??


--
Your sincerely;
Engineer Mohammad Ali Khan
Master of Science in Computational Engineering (Mechatronics)
University of Erlangen, Bavaria
Germany

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: handlers error

Bård Skaflestad
Just for the record: What version of Octave are you using?

On 03/06/15 15:57, ALI Khan wrote:

> error: handles to nested functions are not yet supported

That seems clear enough.  You're using a feature (handles to nested
functions) that is not supported in (your version of?) Octave.

If at all possible, I'd suggest rewriting the code so that your "PMZMT"
function becomes a subfunction rather than a nested function.


Sincerely,
--
Bård Skaflestad
SINTEF ICT, Applied Mathematics

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: handlers error

Bård Skaflestad
Note: You should always Cc: the mailing list to increase exposure of the
discussion.  I didn't notice that this was sent in private e-mail until now.


On 03/06/15 17:44, ALI Khan wrote:

> yes the error is obvious but on forums it is quite confusing
> information some say it is possible to code as I have done and some
> say not. As I am using the latest version I expect it works

I don't really know what to say.

Irrespective of "forum" advice and your own expectations, your Octave is
telling you that what you're trying to do is not supported--at least not
at this time.  The prudent and practical thing to do, then, is to
recognise the current state of support, structure your code accordingly
and possibly update it once the feature becomes available.


Sincerely,
--
Bård Skaflestad <[hidden email]>
SINTEF ICT, Applied Mathematics

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave