Error with exponential term

Hi everyone,
I do have a question regarding the function of exponential result no showing all the decimal points.
Here is the code I have written: (For Kg1, it only shows "0". But, in kg2, it shows the whole result.) It would be greatly appreciated if anyone has any suggestion. Thank you.
T1=600;
kgo1=0.1;
Eg1=10000;
Rg1=8.314;
Kg1=kgo1*exp(-Eg1/Rg1*T1)
kg2=kgo1*exp(-2.00465)
>> E
Kg1 =
0
kg2 =
0.0135
>>

回答 (1 件)

the cyclist
the cyclist 2020 年 3 月 11 日
編集済み: the cyclist 2020 年 3 月 11 日

0 投票

You could type
format long
before running that code, or use the sprintf command to display the result.
Looks like Kg1 is 0 to within double precision, though.
>> exp(-740)
ans =
4.199557989650596e-322
>> exp(-750)
ans =
0

カテゴリ

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

質問済み:

S H
2020 年 3 月 11 日

編集済み:

2020 年 3 月 11 日

Community Treasure Hunt

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

Start Hunting!

Translated by