I am currently trying to write a function that estimates energy expenditure of some lizards through E = e21.44 * (e(8.74901^10?20 / (1.3806488*10?23 *T). T in the equation is equal to the temperature in Kelvin. I know that if I were to plug in a temperature of 20oC the function should give me an output of about 0.829. However, when I run the function (see below) I get 2.628622e-121. I believe it's the way I am stating how temperature is converted from Celsius to Kelvin is incorrect and I am currently stuck on it.
(我目前正在尝试编写一个函数,该函数通过E = e21.44 *(e(8.74901 ^ 10-20 /(1.3806488 * 10-23 * T))估算一些蜥蜴的能量消耗。等式中的T等于温度在开尔文(Kelvin),我知道如果插入20oC的温度,该函数应给我约0.829的输出。但是,当我运行该函数(见下文)时,我得到2.628622e-121。我正在说明温度是如何从摄氏温度转换为开尔文的,这是不正确的,我目前仍然坚持。)
TempKelvin <- 273.15
Energy = function(TempKelvin = 273.15 {
exp(24.11) * exp(-8.74901*10^20 / (1.3806488*10^-23 * (T + TempKelvin)))
}
Energy(T = 28)
ask by Wheresbreakfast translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…