Dear all,
I have to take several thousand files, load them or open them in matlab, multiply one of the columns by a constant value. For this i would like to use a loop, my thought was to best use the sprintfunction. SO far so good. However already in trying to load the data i get stuck. I ran into this problem a couple of times and woudl really appreciate if someone could help me 🙂
The files are double column files, and the format is .dat. If i load them individually that is no problem but somehow when i use the sprintfunction it does not work.
What i tried
1) load('C:\Desktop\waxs_import_export\e16265_1_01729_00000_00191.dat') %works fine
then
2) for ii=191:192
stemp = sprintf('C:\Desktop\waxs_import_export\e16265_1_01729_00000_00%d.dat', ii)
load(stemp)
end
the problem seems to be that it cannot read the file:
Unable to read file 'C:\Desktop\waxs_import_export'. Input cannot be a directory
does anybody know which sacred matlab rule i violated this time, and help me?
Thank you very much
Best Answer