need a code to restart matlab automatically run a function and then restart matlab doing the same

Hi guys, I need a function that allows me to close matlab then open matlab and run a specific function then close again and then restart.
The rationale behind this is that the matlab timer function gives me lots of errors after a few hours. If I restart matlab then I can circumvent the problem.

 Respuesta aceptada

I use restart of Matlab as the last resort when the execution has screwed up badly.
system( '"c:\m\startup\test4ida_hard_reset.bat" &' );
quit
The Windows bat-file is zipped and attached.
Yes, it's also a timer driven program, which should run "forever".

Más respuestas (1)

Why not fix the errors? This sounds like a pretty bad workaround.
Here it is anyway:
system('matlab &');quit

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Preguntada:

AA
el 27 de Feb. de 2015

Editada:

el 28 de Feb. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by