Can we use 'parfor' in user defined function?
显示 更早的评论
Hello, Can we use 'parfor' in used defined functions? I want to use parfor in user defined functions to improve the speed of my code but its not working. Is there any way we can use it?
3 个评论
KSSV
2017-8-6
What function you are trying to use parfor?
Mohsin Shah
2017-8-6
Walter Roberson
2017-8-6
That use of parfor is not permitted because the output would depend upon which iteration ran last. You need either assign to an indexed variable or you need to use a reduction variable (for example totaling the values of the individual iterations)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!