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.

 採用された回答

per isakson
per isakson 2015 年 2 月 28 日
編集済み: per isakson 2015 年 2 月 28 日
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".

その他の回答 (1 件)

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

2 件のコメント

AA
AA 2015 年 2 月 27 日
it is a bug
In your code, I suspect? Why not fix it?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索

質問済み:

AA
2015 年 2 月 27 日

編集済み:

2015 年 2 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by