Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: fzero for code generation
Posted:
Nov 27, 2012 8:45 AM
|
|
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 > http://www.mathworks.in/help/matlab/ref/fzero.html > 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: http://www.mathworks.com/help/optim/ug/passing-extra-parameters.html#bskkr4z
Alan Weiss MATLAB mathematical toolbox documentation
|
|
|
|