How to make autorun and auto exit

2 次查看(过去 30 天)
joo tan
joo tan 2011-12-20
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
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
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?

类别

Help CenterFile Exchange 中查找有关 String Parsing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by