help understanding cell and (end+1) use
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Images 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!