Return values in a parfor loop
古いコメントを表示
Heyhey,
at the moment my source code looks like this
ParForQueue = parallel.pool.DataQueue;
afterEach(ParForQueue,@AddStruct);
parfor m = 1:Anzahl
...
send(ParForQueue, Satz)
end
...
function [] = AddStruct(Satz)
global TabellenRueckgabe
...
end
My question is: how is it possible to avoid the global variable. I want to use the function like this instead of using global
function [TabellenRueckgabe] = AddStruct(Satz, TabellenRueckgabe)
TabellenRueckgabe(x) = Satz;
...
end
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Background Processing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!