How to make autorun and auto exit

Dear all,
I have 2 file.m ..Let say A.m and B.m..first i need to run the A.m file and at the middle running, i need load and run the B.m file.After B.m file finish, i want to autoexit the B.m file and continue with processing in A.m file untill end.. .so, how i can do like that? What the command??

回答 (2 件)

Andreas Goser
Andreas Goser 2011 年 12 月 20 日

0 投票

Just call the B file at the line of file A where you need it. If the file name is my_script.m, the command is
my_script
If you have a function, make sure you learn how to use parameters, see documentation.

1 件のコメント

Robert Cumming
Robert Cumming 2011 年 12 月 20 日
i would advise you use functions - it will help in the long run and make bug fixing easier.

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

joo tan
joo tan 2011 年 12 月 20 日

0 投票

Dear Andreas Goser,
ok..i will try your suggestion..so, it will automatic run the B file? so, the last B.file , i need put command exit?

1 件のコメント

Andreas Goser
Andreas Goser 2011 年 12 月 20 日
You do not even need EXIT.

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

カテゴリ

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

質問済み:

2011 年 12 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by