MATLAB Answers

0

Will there be a support of the parallel toolbox in Matlab App Designer?

Asked by Jackrecki on 12 Nov 2017
Latest activity Commented on by Friedrich
on 2 Jul 2019
Dear all, i want to use parfor loops in Matlab App Designer. Is there a way to make this work? It didn´t work in the Editor itself and also with seperated functions. Otherwise will that be implemented in future Matlab releases?
Thank you!

  0 Comments

Sign in to comment.

1 Answer

Answer by Stefanie Schwarz on 26 Jun 2019
Edited by Stefanie Schwarz on 26 Jun 2019
 Accepted Answer

Using App Designer, you can basically call into any functionality available with your MATLAB/Simulink installation. If you have Parallel Computing Toolbox installed and licensed for, you will be able include calls to PARPOOL, PARFOR, etc. in your app and run parallel computations.
For deploying your app to a standalone executable using MATLAB Compiler, all command-line functionality from Parallel Computing Toolbox is supported as well:

  1 Comment

Note the limitation of accessing the app object inside the parfor loop or any other functions called though Parallel Computing Toolbox.
If you need to access properties of your app pass them down as values directly, e.g. instead of
b = [0,0];
parfor i=1:2
b(i) = app.myprop*2
end
use
tmp = app.myprop;
b = [0,0];
parfor i=1:2
b(i) = tmp*2
end

Sign in to comment.