anonymous functions and parfor
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Parallel Computing Toolbox finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!