필터 지우기
필터 지우기

how to open many matlab instances from matlab?

조회 수: 12 (최근 30일)
Mario Trevino
Mario Trevino 2013년 10월 29일
댓글: Mario Trevino 2013년 10월 29일
hi there, I want to make a function that opens multiple matlab instances (from within matlab) and then starts running different functions on each instance... can somebody help me?

채택된 답변

Shaun VanWeelden
Shaun VanWeelden 2013년 10월 29일
!matlab -r disp('hi') &
Where instead of disp('hi') you would put what function you would like. Keep in mind what directory you are using as you go about this. If your function is not in the starting directory, you will get an error as expected.
  댓글 수: 2
Shaun VanWeelden
Shaun VanWeelden 2013년 10월 29일
The ! means run this from command line, the & is important because without it, the initial MATLAB session will never make it past that command because it keeps waiting for the process to terminate. Find more about different args here: http://www.mathworks.com/help/matlab/ref/matlabwindows.html
Mario Trevino
Mario Trevino 2013년 10월 29일
nice! thanks Shaun!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Zack Peters
Zack Peters 2013년 10월 29일
Hi Mario,
An alternative is to use the Parallel Computing Toolbox to open up several MATLAB workers and run commands on each worker in parallel if desired. I don't know your specific application, but the Parallel Computing Toolbox (PCT) houses a wide array of distributed computing functionality design specifically for users who would like to get more out of MATLAB by using a stable distributed computing platform.
If you would like more information on specific features and functionality available in PCT, I would be more than happy to help.
~Zack
  댓글 수: 1
Mario Trevino
Mario Trevino 2013년 10월 29일
thank you Zack, Im aware of the PCT, for now I just want to solve the issue without it....the answer below by Shaun does the job pretty well. thanks!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by