フィルターのクリア

How can I save the variables x and fval when using [x,fval] = fmincon() in a parfor?

1 回表示 (過去 30 日間)
Patrick
Patrick 2016 年 3 月 25 日
コメント済み: Patrick 2016 年 3 月 30 日
I get the following error:
An UndefinedFunction error was thrown on the workers for 'x'. This might be because the file containing 'x' is not accessible on the workers. Use addAttachedFiles(pool, files) to specify the required files to be attached. See the documentation for 'parallel.Pool/addAttachedFiles' for more details.
  1 件のコメント
Patrick
Patrick 2016 年 3 月 30 日
I still get the error message if I try to save the results x{i} to another variable outside the parfor loop. Any suggestions how to do this?

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2016 年 3 月 26 日
parfor K = ....
[x{K}, fval{K}] = fmincon(.....)
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver Outputs and Iterative Display についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by