save about 40 string to array and the save this array to file
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
hi how can i save about 40 string to array ( for example The names of 40 people) into variable(array) and then save these names into file and then Retrieve them back to array
0 commentaires
Réponse acceptée
Walter Roberson
le 18 Déc 2012
Modifié(e) : Walter Roberson
le 18 Déc 2012
YourArray{1} = 'first string';
YourArray{2} = 'benchwarmer';
YourArray{3} = 'hot chocolate';
save('YourMATfile.mat', 'YourArray');
clear YourArray %to prove we got them back
TheData = load('YourMATfile.mat', 'YourArray');
YourArray = TheData.YourArray;
clear TheData
YourArray{3}
0 commentaires
Plus de réponses (1)
Jan
le 19 Déc 2012
The commands needed to solve such basic tasks are explained exhaustively in the Getting Started chapters. It is required to read them, when you want to use such a powerful system like Matlab.
1 commentaire
Voir également
Catégories
En savoir plus sur Cell Arrays 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!