From: Vyjayanthi A on
Hi,
Can any one explain how can I use fminsearch and ode functions in the same m-file.
I have to solve nonlinear equations (which is 6 equations with 6 unkowns) ,then the values I obtain from the above equations will be used in the differential equations.
As these equations are in the loop, for the second iteration the values from the differential equation has to be used in nonlinear equations.
Can any one please help me where to define fminsearch in this kind of program.

example:

for i==1:100
x0=1;
nonlinear equations,
a=P+exp(b)+a^3;
b=a+lob(b)+x;
differential equations,
dx/dt=a+b^2;
dP/dt=1+exp(a)
end
'P' , 'x', 'a','b',values changes for every iteration and the values obtained from the differential equations has to be used in the nonlinear equations.

I am trying to solve from the past 1 week.
Any kind of help is highly appreciated.
Thank you