 Quote by mahdi_zabchek
No! No! it has y and t!
A and B and C and D are NOT constant parameters!
I did't write them because they were not necessary!
in fact You don't need to know what's the equation exactly to answer my question!
My question is simple:
MATLAB ODE solvers solve equations in form of dy/dt=f(t,y) but I want to solve an equation in form of dy/dt=f(t,y,dy/dt) ... How I can do that by MATLAB?
|
OK. Sorry for the missunderstanding.
May be, you could use an algorithm of this kind:
Start with given initial values y and t.
Recursive process :
Compute A(y,t), B(y,t), C(y,t) and D(y,t)
Solve X=A+B+f(C,D,X) with a numerical equation solver, introduced as sub-program.
With the computed value X=dy/dt the incrementation of y is done, as well as the incrementation of t.
Then continue the recursive process.