How run two algorithms with parallel ?

1 次查看(过去 30 天)
Hi ! I want run two algorithms on parallel in service how i can?

回答(1 个)

mizuki
mizuki 2016-12-4
Parallel Computing Toolbox can allow you to run two processes in parallel.
1. Write two algorithms on two separated functions/scripts - alg1.m and alg2.m
2. PARFOR makes the operations inside of the for-loop parallel:
algs = {'alg1', 'alg2'};
parfor i = 1:length(algs)
algs{i}
end
  1 个评论
Walter Roberson
Walter Roberson 2016-12-4
That should look more like
algs = {@alg1, @alg2};
parfor i = 1:length(algs)
algs{i}()
end
You might need to addAttachedFiles

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Application Deployment 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by