Afficher commentaires plus anciens
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 commentaires
Rajeev
le 26 Mai 2014
hey me too searching for the same question did u get the answer?
Réponse acceptée
Plus de réponses (1)
Paulo Silva
le 28 Mar 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!!
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!