I have .mat file. and first I load my variables (Data_1,Data_2….Data_60) using
for i=1:60 load(['matfiles/Data_',num2str(i),'.mat']); end
I want to use a loop to write to a spreadsheet instead of writing this 60 times. so I do this
for i=1:60 xlwrite('saved_file.xls',Data_1, sheetName,'B3') // Data_1 is one of the variable loaded above.Needs to change to Data_2 and so on.end
now the question is I want to dynamically change the name in Data_1 every iteration using the loaded files. How can I do this.
Best Answer