Check Positive or Negative Infinity

9 views (last 30 days)
Abdulllah
Abdulllah on 24 Jun 2019
Edited: Abdulllah on 24 Jun 2019
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)

Accepted Answer

madhan ravi
madhan ravi on 24 Jun 2019
Edited: madhan ravi on 24 Jun 2019
sign(abc) .* isinf(abc)

More Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 24 Jun 2019
y=abc>=0 && isinf(abc)

Categories

Find more on Mathematics and Optimization in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!