Saving part of a cell array

조회 수: 5 (최근 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 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