Saving part of a cell array

4 ビュー (過去 30 日間)
Victor
Victor 2014 年 7 月 1 日
コメント済み: Victor 2014 年 7 月 1 日
Is there a way to save a part of a cell array like test{1,1}, test{1,2}...etc to separate variables in a .mat file?
  1 件のコメント
Sara
Sara 2014 年 7 月 1 日
Why do you want to do that? What name do you want to assign to each part of the cell array, e.g., a = test{1,1}; b = test{1,2}, or something else?

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 1 日
You can do it, but it's really a bad idea, you can access any part of your cell by
test{1,n}
  1 件のコメント
Victor
Victor 2014 年 7 月 1 日
I have a variable in my workspace that contains a matrix. I want to save that variable inside a .mat file that i have already created called test.mat. Can i do this inside a function? Like the function will get the workspace variable and save it to the .mat file, but the workspace variable name is inputted by the user in one of the input function arguments.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWorkspace 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