Naming variables from one column Import file
Afficher commentaires plus anciens
Hello,
I am importing a selected amount of cells from an excel file (selected manually - let's say cells A1:A5) and MATLAB automatically names the variable with the column name (A). Then, when I import cells A6:A10, MATLAB automatically name the variable A again, which overwrites the first variable. It is time consuming to rename the variables manually one by one as I have hundreds of them.
Is there a way to attribute imported cells to a variable name (I have a list of the variables in order) ?
Thank you!
Réponse acceptée
Plus de réponses (1)
Rik
le 12 Mai 2021
1 vote
Don't store data in a variable name.
You should use cell arrays or fields of a struct instead.
1 commentaire
meryem berrada
le 12 Mai 2021
Catégories
En savoir plus sur Workspace Variables and MAT Files 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!