Borrar filtros
Borrar filtros

Why function "care" doesn't work when used in function that is called from Simulink?

6 visualizaciones (últimos 30 días)
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

Respuestas (2)

Andrew Schenk
Andrew Schenk el 3 de Mzo. de 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.

Rohollah Moghadam
Rohollah Moghadam el 9 de Ag. de 2019
Editada: Rohollah Moghadam el 9 de Ag. de 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.

Categorías

Más información sobre Matrix Computations en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by