[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vpasolve to find all real roots for multiple nonlinear equations and
From: |
sam kjm |
Subject: |
Re: vpasolve to find all real roots for multiple nonlinear equations and multiple variables |
Date: |
Mon, 30 May 2016 08:45:37 -0700 (PDT) |
Thanks for pointing that out!
My updated codes are as follows:
## Constant parameters
k0 = 0.1; #uM/min
kd = 0.05; #/min
k1 = 0.6; #uM/min
j1 = 0.1; #uM
km1 = 0.2; #uM/min
jm1 = 0.1; #uM
k2 = 0.4; #/min
j2 = 0.1;#uM
km3 = 7.05;# /min
jm3 = 2; #uM
## setting the variables prot1 and prot2s
total_prot2 = 2; # total protein2 in the cell
syms prot1 prot2s positive; #prot2s = activated protein2
prot2 = total_prot2 - prot2s; # prot2 = unactivated protein2
## setting the rate expressions (degradation rate, production rate etc)
v0 = k0;
v1 = vpa((k1 * prot2) / (j1 + prot2));
vm1 = vpa((km1 * prot2s) / (jm1 + prot2s));
v2 = vpa((k2 * prot1 * prot2s) / (j2 + prot2s));
vm3 = vpa((km3 * prot1 * prot2s) / (jm3 + prot2s));
## 2 steady state equations to be solved by vpasolve etc...
ss_prot1 = v0 - v2 - kd*prot1 == 0;
ss_prot2s = v1 - vm1 - vm3 == 0;
equations = [ss_prot1, ss_prot2];
variables = [prot1, prot2s]; ## an update here prot2s
[sol_prot1 sol_prot2] = vpasolve(equations, variables)
And I got the following
Python exception: TypeError: bad operand type for abs():
'MutableDenseMatrix'
occurred at line 20 of the Python code block
Is there probably another way to vpasolve? I tried fsolve before but it
needs initial values so it gives me only 1 answer for prot1 and 1 answer for
prot2s for a particular start value for prot1 and prot2s
--
View this message in context:
http://octave.1599824.n4.nabble.com/vpasolve-to-find-all-real-roots-for-multiple-nonlinear-equations-and-multiple-variables-tp4677276p4677279.html
Sent from the Octave - General mailing list archive at Nabble.com.
- vpasolve to find all real roots for multiple nonlinear equations and multiple variables, sam kjm, 2016/05/30
- Re: vpasolve to find all real roots for multiple nonlinear equations and multiple variables, Doug Stewart, 2016/05/30
- Re: vpasolve to find all real roots for multiple nonlinear equations and multiple variables,
sam kjm <=
- Re: vpasolve to find all real roots for multiple nonlinear equations and multiple variables, Colin Macdonald, 2016/05/30
- Re: vpasolve to find all real roots for multiple nonlinear equations and multiple variables, Colin Macdonald, 2016/05/30
- Re: vpasolve to find all real roots for multiple nonlinear equations and multiple variables, sam kjm, 2016/05/30
- Re: vpasolve to find all real roots for multiple nonlinear equations and multiple variables, Colin Macdonald, 2016/05/31