How can I save a list of variables as an argument of SAVE function in MATLAB?

32 views (last 30 days)
I am looking for an example which illustrates how to save a list of variables as an argument of SAVE function.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
Following is an illustrative example which describes how to save a list of variables as an argument of the SAVE function:
a = 1;
b = 2;
c = 3;
C = {'a', 'b', 'c'}; % Creating the list of variables
save('foo2.mat', C{:})

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!