How to save cell array of workspace vars into mat?

조회 수: 33 (최근 30일)
Penny Ibil
Penny Ibil 2020년 4월 2일
편집: Stephen23 2022년 2월 23일
If I have some variables in the base workspace, and a cell array of their names e.g. vars = {'A', 'B', 'C}, how can I use the save function to stores them to a mat? This doesn't work:
save('test.mat', vars)

채택된 답변

Stephen23
Stephen23 2020년 4월 3일
편집: Stephen23 2022년 2월 23일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by