anonymous functions and parfor
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Parallel Computing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!