save matrix....load matrix

277 ビュー (過去 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 件のコメント
Andrew
Andrew 2014 年 1 月 28 日
thank you!

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

その他の回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 1 月 28 日
編集済み: Mischa Kim 2014 年 1 月 28 日
Use
save('A.mat','A')
and the corresponding load.
  1 件のコメント
Andrew
Andrew 2014 年 1 月 28 日
thank you!

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

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by