[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vpasolve to find all real roots for multiple nonlinear equations and mul
From: |
sam kjm |
Subject: |
vpasolve to find all real roots for multiple nonlinear equations and multiple variables |
Date: |
Mon, 30 May 2016 07:38:21 -0700 (PDT) |
Hi all
I would appreciate any help in this thanks! Im 2 months old to coding!
Before I go on to my codes, my main aim is to find all real roots for 2
nonlinear equations(ss_prot1 and ss_prot2 which are steady-state rate
equations(==0) of 2 different proteins ) that contain 2 variables( prot1 and
prot2s).
I am currently using the "symbolic" package 2.3 for octave source forge
## 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_prot2 = v1 - vm1 - vm3 == 0;
equations = [ss_prot1, ss_prot2];
variables = [prot1, prot2];
## vpasolve!
[sol_prot1 sol_prot2] = vpasolve(equations, variables)
Resuts:
Python exception: TypeError: bad operand type for abs():
'MutableDenseMatrix'
occurred at line 20 of the Python code block
_______________________________________________________________
Does anyone know what this means?
Thanks for your time!
--
View this message in context:
http://octave.1599824.n4.nabble.com/vpasolve-to-find-all-real-roots-for-multiple-nonlinear-equations-and-multiple-variables-tp4677276.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 <=
- 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, 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