How to export and save values in a cell?
3 ビュー (過去 30 日間)
古いコメントを表示
I have a variable in my workspace with 3 rows and 16 columns. Now I want to save the values in the cell in the first row and column13 separately (there is a column of 1000 values in that cell). I use:
A = save(variable_name{1: 13});
However, I get the error: too many output arguments. Does anyone know how I can extract the column vector in that one cell?
Thanks, and sorry if this is a very basic question.
2 件のコメント
Chad Greene
2017 年 7 月 20 日
Right, the save function is trying to save a .mat file on your computer. Do you want to save a .mat file or are you trying to get the values of the cell into an array called A?
採用された回答
Star Strider
2017 年 7 月 20 日
Call the save function without any output arguments. The function does not support them.
To save the cell in row 1 and column 13 separately, define it as a variable and then save the variables you want:
R1C13 = cell_array(1,13);
save('filename.mat', 'R1C13')
Experiment to get the result you want.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File 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!