Hello everyone,
I am running a loop where a variable U is calculated and saved in a .mat file under a unique name every iteration. To name the .mat file I use sprintf:
for j:length(d) % Long calculation of U left out
save(sprintf('U%02d',j+1), 'U', '-v7.3'); end
Each U is now saved in a .mat file named with the iteriation number with two digits after 'U' and in mat version 7.3. This works great.
However, I would also like define the folder location where the .mat file is saved. I know how to do this using the save command without sprintf but I can't seem to get this to work in combination with sprintf.
Any help is greatly appreciated,
Thank you, Roel
Best Answer