Use Parallel Toolbox to debug multiple scripts

조회 수: 5 (최근 30일)
David K
David K 2015년 8월 13일
답변: Harsha Medikonda 2015년 8월 17일
I have two different scripts that I would like to debug simultaneously so I can compare their behavior. Is there a way I can use the Parallel Computing Toolbox to do this? The only way I've thought of is opening two separate instances of Matlab and debugging one script in each.

답변 (1개)

Harsha Medikonda
Harsha Medikonda 2015년 8월 17일
Hi David,
I understand that you wish to know if Parallel Computing Toolbox can be used for debugging two MATLAB files simultaneously in the same MATLAB session.
For profiling parallel code or simply MATLAB code you can use the "profile" function. It is not possible to debug two functions simultaneously with or without using the Parallel Computing Toolbox in the same session of MATLAB. Using the Parallel Computing Toolbox, it will complain if you are trying to open a parallel pool twice. In MATLAB, it does not allow simultaneous execution, you need to wait until one is complete. The best way is to use the "profile" command, which will generate a report that you can use to compare the performance of both the scripts/functions or use two sessions of MATLAB. Please refer to the following documentation links for the usage of "profile" function.
Thanks!
Harsha

카테고리

Help CenterFile Exchange에서 Performance and Memory에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by