Effacer les filtres
Effacer les filtres

save matrix....load matrix

755 vues (au cours des 30 derniers jours)
Andrew
Andrew le 28 Jan 2014
Commenté : Andrew le 28 Jan 2014
A =
2 3 4
5 6 7
8 8 9
how can i save the matrix A to a file (txt or mat)? And then load it and have
C=...something...
and in matlab it will appear
C =
2 3 4
5 6 7
8 8 9
thank you...

Réponse acceptée

Amit
Amit le 28 Jan 2014
You can save the variable as a mat file using something like this:
save('saveA.mat','A');
To do the second step, you can create a matfile object like;
example = matfile('saveA.mat');
C = example.A;
  1 commentaire
Andrew
Andrew le 28 Jan 2014
thank you!

Connectez-vous pour commenter.

Plus de réponses (1)

Mischa Kim
Mischa Kim le 28 Jan 2014
Modifié(e) : Mischa Kim le 28 Jan 2014
Use
save('A.mat','A')
and the corresponding load.
  1 commentaire
Andrew
Andrew le 28 Jan 2014
thank you!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Workspace Variables and MAT-Files 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!

Translated by