필터 지우기
필터 지우기

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

조회 수: 1 (최근 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 CenterFile Exchange에서 Solver 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