nonlinear regression by least square

I do have one problem with kinetic modeling. Let's say a reaction occurs in such a way
A <------> B (reversible way)
where k1 is a constant for A change to B
and k2 is a constant for B change to A

so I used ODE solver to solve the problem mentioned and successfully get a graph. However, I do not know how to fit my experimental data into the graph and get the reaction constant k1 and k2 using matlab. Anyone can help? How to use matlab nonlinear regression by least square? Thanks in advance.

function dxdt=matlab(t,x)
global k1 k2
k1=0.1; k2=0.01;

[t,x]=ode45{@matlab,[0 50],[0.1 1]}

Matlab newbie
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!