Mostrar comentarios más antiguos
I have a for-loop that executes commands and displays the answer for each iteration. Please, can someone tell me how to concatenate all the answers into an array instead of having the results displayed independently for each iteration. cheers.
2 comentarios
Rajeev
el 26 de Mayo de 2014
hey me too searching for the same question did u get the answer?
Respuesta aceptada
Más respuestas (1)
Paulo Silva
el 28 de Mzo. de 2011
a=[]
for b=1:10
a=[a b] %replace the b with the data you want to store per iteration
end
a %result is inside this variable
The code doesn't do any memory pre-allocation!!
Categorías
Más información sobre Logical 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!