Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
为什么能正常运行的parfor代码封装成函数后无法运行?
조회 수: 2 (최근 30일)
이전 댓글 표시
以下包含 parfor 的代码可以正常运行:
c = cell(1, 10);
parfor ii = 1:10
c{ii} = 1;
end
同样的代码包装成函数(仅仅添加一行function tempFcn()),即显示语法错误:输出变量 c 不能再 PARFOR 循环后使用:
function tempFcn()
c = cell(1, 10);
parfor ii = 1:10
c{ii} = 1;
end
请问这是什么原因?
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!