Parfor loop variable cannot be classified!
显示 更早的评论
When I try to execute the above code with parfor instead of using for, I get the following error :
Error: The variable study in a parfor cannot be classified. See Parallel for Loops in MATLAB, "Overview".
I think the "Form of Indexing : Within the list of indices for the variable, exactly one index involves the loop variable." rule for sliced variables in parfor is causing the issue. (Because study(i).run(j) has not been indexed according to parfor requirements.) But since I have a structure with different fields and I need to update the field 'run' in the structure 'study', is there any way i could make this code compatible with parfor ? Any help/suggestion is really appreciated!
采纳的回答
更多回答(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!