Indexing inside variables name
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
federico gentile
le 19 Avr 2022
Modifié(e) : Stephen23
le 19 Avr 2022
Hello everybody,
I have a set of arrays inside the workspace whose names are like the followings: Data1_Asc, Data1_BML, Data2_Asc, Data2_BML... Datan_Asc,Datam_BML.
I want to divide these variables into n different .mat files where each variable inside everyone of these files would be named as:
Data1_Asc, Data1_BML.
Any suggestion?
Thanks
1 commentaire
Stephen23
le 19 Avr 2022
Modifié(e) : Stephen23
le 19 Avr 2022
"Indexing inside variables name"
Forcing pseudo-indices into variable names is much less efficient than using actual indices.
Accessing numbered variable names forces you into writing slow, complex, inefficient, fragile, obfuscated code.
You did not tell us the most important information: how did you get all of those variables into the workspace?
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Whos 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!