フィルターのクリア

Can I avoid broadcast variable message within parfor loop

1 回表示 (過去 30 日間)
Eva-Maria Weiss
Eva-Maria Weiss 2019 年 7 月 31 日
回答済み: Walter Roberson 2019 年 7 月 31 日
I want to use a parfor loop. My goal is to cut a tall column array in pieces to evaluate a smaller data amount. So far matlab underlines my variable dataBin with the message it's a broadcast variable
% dataBin = tall column array
% chunkLen = length of a chunk, to get a small part of the tall column array for evaluation using gather
parfor c = 1:numbCh
temp = dataBin((c-1)*chunkLen + 1 : c*chunkLen);
% ...some calculations returning vector..
dataCell(c,1) = vector;
end
Is there a way to avoid this message?
Thank you in advance

採用された回答

Walter Roberson
Walter Roberson 2019 年 7 月 31 日
Reshape dataBin to chunkLen rows by whatever. Access one column indexed by the parfor variable

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeParallel for-Loops (parfor) についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by