How to replace cell array in tlc file
Mostrar comentarios más antiguos
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);
Respuestas (0)
Categorías
Más información sobre Target Language Compiler en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!