domain error. to compute complex results from real x, use 'log(complex(x))'

조회 수: 5 (최근 30일)
farid
farid 2023년 7월 9일
댓글: Walter Roberson 2023년 7월 10일
hello, I'm having trouble with the domain error. to compute complex results from real x, use 'log(complex(x))' on my project fuel cell. how to handle it?

답변 (1개)

Walter Roberson
Walter Roberson 2023년 7월 9일
At some point your x becomes negative. MATLAB proper would handle the situation by creating a complex result, but Simulink generates an error message because such situations in Simulink often result from an incorrect model or omission in thinking about the model
  댓글 수: 2
farid
farid 2023년 7월 10일
is it possible to ignore it to generate ?
Walter Roberson
Walter Roberson 2023년 7월 10일
When your x goes negative what results would you want from the log()? If you want the log of the absolute value of x then code the log of the absolute value of x.

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

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by