i have a for loop and a vector in this loop that chang each loop that spend how can save this vector in all times ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
fatemeh
el 18 de Oct. de 2013
Comentada: fatemeh
el 18 de Oct. de 2013
like this code: h=1000 for i=1:h m=[i j] end that j change with every i how can save m vectors that produce in each time at loop?
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 18 de Oct. de 2013
Editada: Azzi Abdelmalek
el 18 de Oct. de 2013
h=1000
m=zeros(1000,2)
for i=1:h
m(i,:)=[i i+1]; %for example
end
disp(m)
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!