在Simulink中使用Matlab Function模块,在该模块中调用dare命令导致Simulink仿真时报错;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和报错信息:


回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!