Create a folder for each iteration and save workspace and figures
조회 수: 22(최근 30일)
Hello, I need to save the workspace and figures for each iteration. The resulting workspace and figures should be placed in a new folder for each iteration. The iterations are a function of two parameters A and B, so I have two 'for' loops.
...stuff to run...
%HERE NEED TO CREATE A FOLDER AND SAVE BOTH WORKSPACE + FIGURES
cd('C:\Output\Results_"value of IdxParaA"_"value of IdxParaB"
I have 5 values for ParaA and 4 values for ParaB so in the end I need to have 20 folders named as:
Please let me know if this is not clear or there is a post that answers it
Star Strider 2015년 4월 17일
I wouldn’t save them each in a different directory, simply a different .mat file. See the documentation for save, load, and matfile for details. You’ll have all your variables — regardless of type — in each .mat file, and you’ll be able to load all or some of the variables into your workspace as you need them later.