lsqrsolve with ode

Maso Ricci ricci2 at unisi.it
Thu Jul 9 12:28:10 CEST 2009


hi all,

I wrote a script for studying some kinetics and would like to fit the 
the thoeretical data from the script with my real data in order to 
evaluate the kinetic constants (ki).

Is it possible to "combine" the lsqrsolve command with ode ?

thanks in advance


/maso


xg=read('guess3.txt',-1,1);
iSize=size(xg);
for i = 1:iSize(1)
  //x0(i)=[x1(i)];
end
function dx = purineval(t,x)

   f1 = k1*x(1)*x(2)
   f2=k2*x(4)*x(3)
   f3=k3*x(4)

   dx(1)=-f1+f2
   dx(2)=f1/2+f2
   dx(3)=-f1-f2
   dx(4)=-f2-f3
   dx(5)=f3

endfunction

k1=0.32*10^(-3);
k2=14.3*10^(-6);
k3= 5.3 *10^(-5) ;


t=0:10000:1000000;



x0=[xg(1);xg(2);xg(3);xg(4);xg(5)];
x=ode(x0, 0, t ,purineval);

xbasc()
plot2d(t,x(1,:), style=1)
plot2d(t,x(2,:), style=2)
plot2d(t,x(3,:), style=3)
plot2d(t,x(4,:), style=4)
plot2d(t,x(5,:), style=5)




-- 

Maso Ricci Ph.D.

Dipartimento Farmaco Chimico Tecnologico

Università degli Studi di Siena
Via A. Moro, 2 ­ 53100 Siena
ITALY
Tel: +39 0577 234367
Fax: +39 0577 234177
email: ricci2 at unisi.it



More information about the users mailing list