save matrix....load matrix

841 次查看(过去 30 天)
Andrew
Andrew 2014-1-28
评论: Andrew 2014-1-28
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...

采纳的回答

Amit
Amit 2014-1-28
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 个)

Mischa Kim
Mischa Kim 2014-1-28
编辑:Mischa Kim 2014-1-28
Use
save('A.mat','A')
and the corresponding load.

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by