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

16 vues (au cours des 30 derniers jours)
Emilio Pulli
Emilio Pulli le 17 Nov 2021
Commenté : Emilio Pulli le 20 Nov 2021
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 commentaires
Adam
Adam le 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.
Emilio Pulli
Emilio Pulli le 20 Nov 2021
Thanks man, really really appreciated!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Environment and Settings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by