How to replace cell array in tlc file
Show older comments
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);
Answers (0)
Categories
Find more on Target Language Compiler 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!