How to save cell array of workspace vars into mat?

28 次查看(过去 30 天)
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