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 日

1 投票

sign(abc) .* isinf(abc)

その他の回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 6 月 24 日

1 投票

y=abc>=0 && isinf(abc)

カテゴリ

ヘルプ センター および File ExchangeDates and Time についてさらに検索

製品

リリース

R2018b

質問済み:

2019 年 6 月 24 日

編集済み:

2019 年 6 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by