使用sysic命令创建互连系统时,如下面的代码所示;
% Random systems for example
scaledPlant=rss(4,4,4);
WControl=rss(4,4,4);
WError=rss(4,4,4);
% actual problem code
systemnames = ' scaledPlant WControl WError';
inputvar = '[r(4); u(4)]';
outputvar = '[WControl; WError;r[1]- scaledPlant[1]]';
input_to_scaledPlant = '[u]';
input_to_WError = '[r-scaledPlant]';
input_to_WControl = '[u]';
sysoutname = 'P';
cleanupsysic= 'yes';
sysic
其中scaledPlant,WControl和WError都是4输入4输出模型
我收到以下错误
Error in ==> sysic>LOCALpass1 at 406
err = 0;
??? Output argument "arraydata" (and maybe others) not assigned during
call to "C:\Program Files\MATLAB\R2007b\toolbox\robust\robust\sysic.m
(LOCALpass1)".
导致此错误的原因是什么?
答案 0 :(得分:1)
这是因为使用错误的括号表示信号编号,使用[方括号]但应使用(括号)。有关正确使用的示例,请参阅the official documentation
更正后的代码如下;
systemnames = ' scaledPlant WControl WError'; %corrector1 corrector2
inputvar = '[r(4); u(4)]'; %<-- here the number in Parentheses shows the number of signals
outputvar = '[WControl; WError;r(1)- scaledPlant(1)]'; %<-- here it shows the signal number
input_to_scaledPlant = '[u]';
input_to_WError = '[r-scaledPlant]';
input_to_WControl = '[u]';
sysoutname = 'P';
cleanupsysic= 'yes';
sysic