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에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!