MATLAB Answers

0

How to make autorun and auto exit

Asked by joo tan on 20 Dec 2011
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??

  0 Comments

Sign in to comment.

2 Answers

Answer by Andreas Goser on 20 Dec 2011

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 Comment

i would advise you use functions - it will help in the long run and make bug fixing easier.

Sign in to comment.


Answer by joo tan on 20 Dec 2011

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 Comment

You do not even need EXIT.

Sign in to comment.