Intermediate step return ```InF``` while using exp

2 visualizzazioni (ultimi 30 giorni)
```
aa=8e+05;
bb=1e+06;
tf=0.002;
temp=(-(bb*exp(bb*tf)-aa*exp(aa*tf))*exp(-bb*tf-aa*tf)+bb-aa)
```
Output is InF
I believe the InF comes from exp(bb*tf) and exp(aa*tf)
What should do to make this work? Thank you

Risposta accettata

Walter Roberson
Walter Roberson il 3 Giu 2022
Modificato: Walter Roberson il 3 Giu 2022
aa=sym(8e+05) ;
bb =sym(1e+06) ;
tf =sym(0.002);
temp = simplify( (-(bb*exp(bb*tf)-aa*exp(aa*tf))*exp(-bb*tf-aa*tf)+bb-aa))
The answer involves two terms with exp() of -2000 and -1600, plus a constant 2000. The exp() terms are so small that they have no practical effect on the constant. The larger of the two exp() is roughly -1e-689

Più risposte (0)

Tag

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by