フィルターのクリア

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

3 ビュー (過去 30 日間)
Ethen
Ethen 2015 年 3 月 3 日
編集済み: Rohollah Moghadam 2019 年 8 月 9 日
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

回答 (2 件)

Andrew Schenk
Andrew Schenk 2015 年 3 月 3 日
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 2019 年 8 月 9 日
編集済み: Rohollah Moghadam 2019 年 8 月 9 日
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.

カテゴリ

Help Center および File ExchangeMatrix Computations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by