Save figures with a variable name in a subfolder of current working folder
조회 수: 10 (최근 30일)
이전 댓글 표시
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
Adam
2021년 11월 18일
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.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!