cell2str.m
来自「内模控制器(IMC)工具箱。包括参数整定、PID控制器参数转换等」· M 代码 · 共 29 行
M
29 行
function model=cell2str(m)
% function model=cell2str(m)
% Convert cell array which each element containg string representing
% transfer function of the MIMO system to an evaluable string.
[a,b,c]=size(m);
model='[';
for i=1:a
for j=1:b
if j==b
if isempty(m{i,j,1})
model=[model '0'];
else
model=[model m{i,j,1}];
end
else
if isempty(m{i,j,1})
model=[model '0,'];
else
model=[model m{i,j,1} ','];
end
end
end
if i==a
model=[model ']'];
else
model=[model ';'];
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?