Clear Filters
Clear Filters

Is there a way to save a .mat file with a variable as a filename?

1 view (last 30 days)
Hello!
I have a variable defined in my workspace.
Example:
sitename =
US-FR2
How could I save a .mat file with this as the filename (US-FR2.mat), without typing it in manually?
Mil gracias

Accepted Answer

Walter Roberson
Walter Roberson on 5 Jun 2013
save(sitename);

More Answers (1)

Kate
Kate on 5 Jun 2013
Thanks

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!