I am able to run my code only from here C:\Users\39218\Desktop\PROJECT\TD\P2\S6.
Then I have to move in P2S#….then P13S# (there is no a sequential order in the name)
My code computes 4 matrices (indeed there is also a plot where there are all subplots together) and save the output in the current folder.
What I want is to run my code from C:\Users\39218\Desktop\PROJECT. Furthermore, the code has to save those 4 matrices and the big plot for each one S# in a new folder (empty) with the associate name P#S#
FolderStructure= dir ('*.c3d'); %start from folder PM
con= struct2cell(FolderStructure);myFiles =con(1,:)'Phases_I=[];Phases_O=[];GR_I=[];GR_O=[];for z =1:length(myFiles) name = string(myFiles(z))% do something
Phases_I=[Phases_I; Times_Tot_I] Phases_O=[Phases_O; Times_Tot_O] GR_I=[GR_I;GR_Tot_I] GR_O=[GR_O;GR_Tot_O]end% subplot
save('Phases_I.mat','Phases_I')save('Phases_O.mat','Phases_O')save('GR_I.mat','GR_I')save('GR_O.mat','GR_O')
Best Answer