Check Positive or Negative Infinity

11 次查看(过去 30 天)
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