Page 1 of 1

Clear/delete out.log-file...

Posted: Fri Nov 23, 2018 12:40 pm
by stefanschmid
Hi all

I'm running a list of static optimizations through MATLAB using a for-loop. Is there a way to clear/delete the out.log-file after each iteration?

The following does not work (Error-message: "Warning: File not found or permission denied"):
fclose('all')
delete('out.log')

Thanks for your help!
-Stefan

Re: Clear/delete out.log-file...

Posted: Sun Nov 25, 2018 10:00 am
by jimmy
The file is being used by OpenSim so you can't delete it from Matlab. You would have shut down Matlab, which closes the instance of OpenSim, before you can delete. Why do you need to delete it after every iteration?