help understanding cell and (end+1) use
이전 댓글 표시
Hi, i have a script where for the first time i meet the cell array. I've read the documentation and it seems quite clear.
The problem is that i don't understand how they set the indices as they use (end+1). To what it refers as i have 2 for cicle?? If the value is end+1= np.max+1, why don't he just write np+1.
Connectivity=cell(1,nnode);
for i=1:nele
idnodei=element(i,:);
% number of node for element "i-th"
np=length(idnodei);
for j=1:np
nodej=idnodei(j);
Connectivity{nodej}(end+1)=i;
end
end
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Images에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!