The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: fzero for code generation
Replies: 1   Last Post: Nov 27, 2012 8:45 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alan Weiss

Posts: 1,430
Registered: 11/27/08
Re: fzero for code generation
Posted: Nov 27, 2012 8:45 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 11/27/2012 2:46 AM, Pag Max wrote:
> I have a embedded matlab function in my simulink file. This matlab
> function uses fzero and as per this
> I am passing parameters in fzero via anonymous functions. Now though
> fzero is supported by code generations anonymous functions are not.
> What would be other way to pass paramters in fzero without using
> anonymous functions. Thanks,

Anonymous and nested functions are not supported for code generation, as
far as I know. But global variables are. Using global variables is not a
recommended practice in general, but it is documented:

Alan Weiss
MATLAB mathematical toolbox documentation

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.