anonymous functions and parfor
Mostra commenti meno recenti
Hi,
I would like to transform a for loop into a parfor loop. In the for loop I am solving a delayed differential equation via heun method, which means that i am sending the function to be solved as an argument to the heun method.
for nRuns = 1:Nr_runs
res = heunDDE(@function_to_solve, t0, tf, tau,rand, Npoints);
end
With the for loop, i obtain the solution to the DDE without correctly. However, whenever i transform the loop into a parfor, i get:
?? Error using ==> parallel_function at 598
Error in ==> function_to_solve at 9
Index exceeds matrix dimensions.
So what may be my problem here?
Thanks for your help,
Marta
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Parallel Computing Toolbox in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!