Filter löschen
Filter löschen

terminating ALL m-scripts

4 Ansichten (letzte 30 Tage)
Qi Hao Goh
Qi Hao Goh am 5 Mai 2011
hi all,
I'm currently working on TargetLink Code generation and I am facing problem to terminate the whole process if a problem is found:
>tl_generate_code.m
> tl_eval_hook.m
> pre_codegen_hook.m
"*pre_codegen_hook*.m" is called by "tl_eval_hook.m", which is likewise called by "tl_generate_code.m".
The problem I'm facing now is that I don't know how to terminate the WHOLE process if i find problem in the called script "*pre_codegen_hook*.m". I tried using the command "return" but it only brings me to the caller and it doesn't terminate the whole process. Although this is actually about TargetLink but I guess this is applicable in normal MATLAB script.

Antworten (1)

Robert Cumming
Robert Cumming am 5 Mai 2011
use error
help error
  6 Kommentare
Qi Hao Goh
Qi Hao Goh am 5 Mai 2011
good one. Just that I can only edit "pre_codegen_hook.m" and "extrainfo.m". The rest are default script from TargetLink. :/
any other idea?
Robert Cumming
Robert Cumming am 5 Mai 2011
afraid not - apart from exit! Which will ofcourse close matlab itself...

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by