From: kais on 9 Jun 2010 16:48 "Andreas " <uws42841(a)stud.uni-stuttgart.de> wrote in message <hof6h9$b33$1(a)fred.mathworks.com>... > Walter Roberson <roberson(a)hushmail.com> wrote in message <ho78op$81l$1(a)canopus.cc.umanitoba.ca>... > > Andreas wrote: > > > > > i am running a simulation in matlab using the save function to backup > > > intermediate results during the simulation. Im Using Matlab 7.7. > > > (R2008b) unter Linux Ubuntu. > > > > > > I found the problem that on random bases, the save function produces an > > > error during writing: > > > {??? Error using ==> save > > > Unable to write file > > > /home/anduser/Matlab/history/2010-03-20_#76/33_Y_H_Opt_Result: No such > > > file or > > > directory. > > > > > > this is part of a for loop and in 19 of 20 times it works, but randomly > > > it fails. > > > > As an experiment, after the save() call, I would add fclose('all') -- > > unless, that is, you have manually opened a file. > > > > The sort of error you are seeing can happen if Matlab runs out of open > > file descriptors. It *should* close the save file after it has written > > to it, but I seem to recall reading that in at least one version, it had > > problems where it didn't always do that. > > thx for the idea, i tried it and inserted fclose('all') in the loop. but unfortunately the same error occured. also the exist function does not help because the file should be created by the save function. > > thanks anyway, some other ideas ? Check the length of the file name and try to reduce it- Matlab complains when the length is above a thershold. Hope this helps. Kais.
|
Pages: 1 Prev: OpenGL performance Next: How can I automate a script asking for terminal input? |