私はmatlabの並列処理を試みていますが、この間にこのことを自分のコードに適用しようとしました。以下はコードです。
matlabpool open 2
pop = create_population(match_matrix,PopSize);
ftns = zeros(PopSize,1);
parfor i=1:PopSize
ftns(i) = get_fitness(pop{i});
end
matlabpool close
私が得ているエラーは次のとおりです
Error using parallel_function (line 589)
In an assignment A(I) = B, the number of elements in B and I must be the same.
Error stack:
SWIFTga>(parfor body) at 127
Error in SWIFTga (line 126)
parfor i=1:PopSize
parfor を for に置き換えても、エラーは発生しません。何が間違っている可能性があるかを提案してください....