Parfor loop variable cannot be classified!
Mostra commenti meno recenti
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!
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements 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!