How to save cell array of workspace vars into mat?

31 views (last 30 days)
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)

Accepted Answer

Stephen23
Stephen23 on 3 Apr 2020
Edited: Stephen23 on 23 Feb 2022

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!