Hi, in my code I´m doing a loop in order to create a 2X4 matrix and the idea is allocate each matrix under the last one, but each time it runs the previous matrix is deleted. my look like this
for i=1:10 for j=1:10 nodo1=[i,j]; nodo2=[i+1,j]; nodo3=[i,j+1]; nodo4=[i+1,j+1]; punto_med=(nodo1+nodo2+nodo3+nodo4)/4; distancia=sqrt((5-punto_med(1,1))^2+(5-punto_med(1,2))^2); if distancia <=5 nodos= [nodo1; nodo2; nodo2; nodo3]; nodos_totales(:,:) = nodos end endend
where nodos_totales don´t store all the matrix.
thenk if any one can help me.
Best Answer