help-octave
[Top][All Lists]
Advanced

[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: Doug Stewart
Subject: Re: vpasolve to find all real roots for multiple nonlinear equations and multiple variables
Date: Mon, 30 May 2016 12:10:07 -0400



On Mon, May 30, 2016 at 10:38 AM, sam kjm <address@hidden> wrote:
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!


I dont know to full answer but I see that "variables" on line 37 is:

 [prot₁  -prot2s + 2]
 
 
The + 2 looks wrong to me.

--
DAS


reply via email to

[Prev in Thread] Current Thread [Next in Thread]