How to have simple text in a matrix
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hey, so I have a function that I want to automatically load multiple files that are loaded to a certain folder. I'm using a fileID function in a loop to load all of the files with a specific type of file name.
I can't really go into the complicated specifics, but basically is there any way for me to make a matrix out of text?
I tried just doing A = ['text1'; 'text2';...etc]; but that just separates all the letters. I want to be able to say A(1) and for it to spit out "'text1'", not just "text1"...
Thanks!
0 commentaires
Réponse acceptée
Sean de Wolski
le 14 Juin 2011
A = {'text1','text2','Hello World','Happy Birthday'}
A{1}
You need cell arrays
doc cell
for more info
0 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Spreadsheets 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!