在Simulink中使用Matlab Function模块​,在该模块中调用da​re命令导致Simu​link仿真时报错;​Function 'dare' not supported for code generation

'dare' 命令是一个黎卡提方程的一个求解器,是Control_System_Toolbox中的一个.m文件;
在脚本和实时脚本状态下使用dare命令没有问题,但当脚本封装为一个函数.m文件作为MatlabFunction放入Simulink中时,发生报错;
error为‘Function 'dare' not supported for code generation.’;
Function 'MATLAB Function' (#23.726.769), line 28, column 1: "[P,L,M]=dare(Tilde_A,Tilde_B,Tilde_Q,R,S,E)" Launch diagnostic report.
如下两张图为所搭model和报错信息:

Catégories

En savoir plus sur 代码生成 dans Centre d'aide et File Exchange

Produits

Version

R2018b

Community Treasure Hunt

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

Start Hunting!