Check Positive or Negative Infinity

10 visualizzazioni (ultimi 30 giorni)
Abdulllah
Abdulllah il 24 Giu 2019
Modificato: Abdulllah il 24 Giu 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)

Risposta accettata

madhan ravi
madhan ravi il 24 Giu 2019
Modificato: madhan ravi il 24 Giu 2019
sign(abc) .* isinf(abc)

Più risposte (1)

KALYAN ACHARJYA
KALYAN ACHARJYA il 24 Giu 2019
y=abc>=0 && isinf(abc)

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by