Saving workspace via command

I have written code to produce 30 (approx) numeric matrices, all of which I wish to save to a given directory under a single .mat name. What code can be written within the script to save the entire workspace automatically?

 Accepted Answer

save('NameOfFileToSaveTo.mat')

1 Comment

That saves the workspace to the current folder, how would I save it to a defined location?

Sign in to comment.

More Answers (0)

Products

Release

R2021a

Community Treasure Hunt

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

Start Hunting!