fsolve in simulink model

Asked by Hana on 5 Jul 2012
Latest activity Edited by Hana on 6 Jul 2012

hallo, i'm a beginner to matlab and i would appreciate your help.

matlab is showing an error at

   The function 'fsolve' is not supported for standalone code generation. See    the documentation for coder.extrinsic to learn how you can use this function in simulation.

does this suggest that fsolve can't be used in simulink? are there other options, that would do a similar job and that can be used in simulink? i tried different modifications, but it didn't seem to help.

can anyone help me? best regards

0 Comments

Hana

Tags

1 Answer

Answer by Kaustubha Govind on 5 Jul 2012
Accepted answer

Perhaps the (Embedded) MATLAB Function block is not right for you, because FSOLVE is not supported for code-generation. If you're familiar with writing S-functions, writing a Level-2 MATLAB-file S-function might be better.

If you have to use this block, I would create a separate function on the MATLAB path that calls into FSOLVE and performs other operations unsupported for code-generation and call it from the (Embedded) MATLAB Function block using the code.extrinsic directive.

0 Comments

Kaustubha Govind

Contact us