Karlo
Karlo

Reputation: 1708

Is it beneficial to run Matlab calculations in parallel on a multi-core computer?

I have a laptop with a multi-core processor and I would like to run a lengthy loop in which Simulink simulations are performed. Is it beneficial to split the loop into two parts (it is possible in my case), open the Matlab application twice, and run a Matlab script in each of them?

Someone told me that Matlab/Simulink always uses one core per opened Matlab application. Is that correct?

Upvotes: 1

Views: 85

Answers (1)

user664303
user664303

Reputation: 2063

MATLAB splits some builtin functions across multiple cores, but standard MATLAB code uses just one core. Generally, if you are running several independent iterations, then the computation time can benefit from parallelization. You can do this easily using either parfor (if the have the Parallel Computing Toolbox), or batch_job.

Upvotes: 3

Related Questions