Question: Parameter estimation with differential equations

Dear all,

I have one quetion. I have written maple code based on Dr.Robert J. Lopez's one.

Here is my code.

 

> q1 := diff(x(t),t) = -a*x(t)*y(t) + b*z(t);

q2 := diff(y(t),t) = -a*x(t)*y(t) + b*z(t);

q3 := diff(z(t),t) =  a*x(t)*y(t) - b*z(t);

q4:=k(t)=x(t)*y(t)/z(t);

ic := x(0)=10,y(0)=10,z(0)=0;

 

C := < I put Experimental data….>:

> SS := proc(a,b)

local F, V;

if not type([a,b],['numeric','numeric']) then return 'SS'(a,b);

elif a<0 or b<0 then return 1e100;

end if;

F := dsolve(eval({q1,q2,q3,q4,ic},{:-a=a,:-b=b}),[x(t),y(t),z(t),k(t)],numeric, output=Array([seq(k,k=0..N)]));

V := convert(Column(F[2,1],5),Vector);

Norm(V-C,2);

end proc:

 I just put one more equation -eqn4. it is not differential equation.

I currently have error massage from maple. Could you let me know how I solve the equations in this case?

 

Thanks.

Please Wait...