Azzera filtri
Azzera filtri

Save figures with a variable name in a subfolder of current working folder

10 visualizzazioni (ultimi 30 giorni)
I want save figures with a name that is determined by the variables plotted and save them in a subfolder of current working folder. Therefore I need a function that changes the name of the saved figure with a logic given my me. I did the same for the title of the figure by using the function
title(['lambda ',num2str(TSR(k)),' radius optimal section ',num2str(r_rif(t)/R*100),' %']);
where the TSR(k) and r_rif(t)/R*100 are detrmined according to the running of the code. I would like something similar to determine the name with which I save my figure, together with the command to save it a specific folder.
Thank you in advance!
  9 Commenti
Adam
Adam il 18 Nov 2021
You can break up or combine those first 3 arguments I gave as an example however you want. I was just showing how you can piece together a full path from components where you may want to pass in an argument for a different user and then a subpath under that as its own argument. If you prefer you can put the whole path in a single argument and then your file name, with extension as the 2nd argument.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Environment and Settings in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by