Skip to content
Prev 393692 / 398503 Next

R emulation of FindRoot in Mathematica

Dear Troels,


There might be an error in one of the eqs:

# [modified] TODO: check;
mg2atp <- 10^(-7)*Mg*mgatp;

This version works:
x0 = c(
 ?? ?atp = 0.008,
 ?? ?adp = 0.00001,
 ?? ?pi = 0.003,
 ?? ?pcr = 0.042,
 ?? ?cr = 0.004,
 ?? ?lactate = 0.005
) / 30;
# solved the positive value
x0[1] = 1E-6;

x = multiroot(solve.AcidSpecies, x0, H = 4E-8)
print(x)

# Results:
#???????? atp????????? adp?????????? pi????????? pcr cr????? lactate
# 4.977576e-04 3.254998e-06 5.581774e-08 4.142785e-09 5.011807e-10 
4.973691e-03


Sincerely,


Leonard
On 1/23/2023 2:24 AM, Leonard Mada wrote: