How to replace cell array in tlc file

I use some cell array in s-function, now I need to write a tlc file to "code generate"
Is there any easy way to replace cell array ? Or I need use matrix and for loop to overwrite it?
Here is the code of cell array
Np=10;
Q_cell=cell(Np,Np);
for i=1:1:Np;
for j=1:1:Np;
if i==j
%Q_cell{i,j}=[1 0;0 11;];
Q_cell{i,j}=[1 0 0 ;0 1 0;0 0 1];
else
Q_cell{i,j}=zeros(Ny,Ny);
end
end
end
Q=cell2mat(Q_cell);

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Target Language Compiler 的更多信息

提问:

2021-8-30

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by