在Simulink中使用Matlab Function模块,在该模块中调用dare命令导致Simulink仿真时报错;Function 'dare' not supported for code generation
Show older comments
'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和报错信息:


Answers (1)
Dongxiao
on 7 Sep 2022
0 votes
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!