How can I use ode45 in order to find a solution to differential equations with an input derivative
For example I have
[t,x] = ode45(@fcn,[0 tmax],zeros(5,1)); function dx = fcn(t, x) e = -x(1) + 1; dx = [(x(2)-x(1))/T2; (x(3)-x(2))/T1; x(4); E_DOT*(kr+Tr/T3)+e*kr/T3-x(4)/T3; e^2]; end
In the above code I need to replace "E_DOT" with the derivative of e. How can I do it?
T1, T2, kr and Tr are constants.
Best Answer