Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab ';输出参数";“arraydata”;(可能还有其他)在呼叫期间未分配';使用sysic时收到错误_Matlab_Control Theory - Fatal编程技术网

Matlab ';输出参数";“arraydata”;(可能还有其他)在呼叫期间未分配';使用sysic时收到错误

Matlab ';输出参数";“arraydata”;(可能还有其他)在呼叫期间未分配';使用sysic时收到错误,matlab,control-theory,Matlab,Control Theory,使用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

使用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)".

造成此错误的原因是什么?

这是因为使用了错误的括号来表示信号编号,使用了[方括号],但应使用(括号)。有关正确用法的示例,请参见

更正代码如下:

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
systemnames='scaledPlant WControl WError';%校正器1校正器2
inputvar='[r(4);u(4)]';%