Why function "care" doesn't work when used in function that is called from Simulink?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello guys,
I am trying to solve an Algebraic Riccati Equation in Simulink. I have used a Matlab Function block in simulink in which I am trying to solve the ARE. But I get this error
"The function 'care' is not supported for standalone code generation. See the documentation for coder.extrinsic to learn how you can use this function in simulation." Does anyone know how to solve this problem?
Thanks in advance. Cheers,
Ethen
0 Kommentare
Antworten (2)
Andrew Schenk
am 3 Mär. 2015
Only a subset of MATLAB functions support C/C++ code generation. An alphabetical list of supported functions is located here: http://www.mathworks.com/help/coder/ug/functions-supported-for-code-generation--alphabetical-list.html
Notice that the function "care" is not present in this list.
You can still run MATLAB in "Normal" mode using the function "care", but if you attempt to use "Rapid Accelerator" mode or compile the Simulink model using the Simulink Coder you will encounter the error message you have given.
0 Kommentare
Rohollah Moghadam
am 9 Aug. 2019
Bearbeitet: Rohollah Moghadam
am 9 Aug. 2019
Use the following code in your Matlab Function block in Simulink, before using 'care' function.
coder.extrinsic('care');
Note: The question is for long time ago. I hope this would be useful for who have same problems.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!