필터 지우기
필터 지우기

Error in parfor (First argument must be scalar.)

조회 수: 4 (최근 30일)
Bhooshan
Bhooshan 2023년 10월 16일
댓글: Sam Marshalik 2023년 10월 16일
I am getting error in parfor as
First argument must be scalar.
in my code i use
parpool(4)
parfor i=1:l
where l is a scalar
when i use just for i=1:l and disbles parpool
the program runs just fine
what i am missing here?
  댓글 수: 1
Bhooshan
Bhooshan 2023년 10월 16일
편집: Bhooshan 2023년 10월 16일
Error using sym/factor (line 51)
First argument must be scalar
Error in mtp (line 17)
parfor i=1:l
is the exact error

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2023년 10월 16일
The error is not on the parfor line. The error is in the call to factor() that is somewhere in your parfor loop
  댓글 수: 1
Sam Marshalik
Sam Marshalik 2023년 10월 16일
@Bhooshan: Can you show the line of code where you are calling factor?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by