Check Positive or Negative Infinity

조회 수: 12 (최근 30일)
Abdulllah
Abdulllah 2019년 6월 24일
편집: Abdulllah 2019년 6월 24일
isinf function gives logical true in both cases whether infinity is postivie or negative but does not tell whether infinity is positive or negative. How can I check whether the infinity is positive or negative?
abc=-1*inf;
isinf(abc)

채택된 답변

madhan ravi
madhan ravi 2019년 6월 24일
편집: madhan ravi 2019년 6월 24일
sign(abc) .* isinf(abc)

추가 답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 6월 24일
y=abc>=0 && isinf(abc)

카테고리

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

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by