Run parallel function.
25 views (last 30 days)
I have one function with different input values
doRolling(Coord,Arrow); %an example of other function
I want to run this function for four direction at the same time, when I do as below, it takes times
Q: How can I run at the same time for one function with different input variables?
I tried to used parfor but it did not work.
Hari Krishna Ravuri on 5 Dec 2019
I understand that, you want to execute four functions parallely.You may consider using parfeval.The syntax of parfeval is
F = parfeval(p,fcn,numout,in1,in2,…)
Please refer https://in.mathworks.com/help/parallel-computing/parallel.pool.parfeval.html for more information on parfeval.