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 日

6 投票

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 件のコメント

Andrew
Andrew 2014 年 1 月 28 日
thank you!

サインインしてコメントする。

その他の回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 1 月 28 日
編集済み: Mischa Kim 2014 年 1 月 28 日

4 投票

Use
save('A.mat','A')
and the corresponding load.

1 件のコメント

Andrew
Andrew 2014 年 1 月 28 日
thank you!

サインインしてコメントする。

カテゴリ

質問済み:

2014 年 1 月 28 日

コメント済み:

2014 年 1 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by