How can I put data into a Cell
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a cell Name = {} And i need to make a list of names using a loop. How do I do this without overwriting ? Thanks
0 commentaires
Réponses (2)
Adam
le 23 Mar 2017
Modifié(e) : Adam
le 23 Mar 2017
for n = 1:numNames
Name{n} = getYourNameFromSomewhere( n );
end
Doing it in a loop implies your names are somewhere where you can assign them without needing to hard code them. Whether that is the case or not I don't know so the above is kind of pseudo-code
3 commentaires
dpb
le 25 Mar 2017
"Show your work!" We can't debug what we can't see...need the code you used and a sample of the data you tried to assign.
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!