How to solve this system of ODEs?
4 views (last 30 days)
I was try to study a dynamical system and for that after accounting for all factor I got the following system of differential equations:
where c is a constant.
I want to find a solution to these differential equations. Is it possible to find an analytical or numerical solution of these equations using matlab. If so how?
I not very much familiar with the procedure for solving differential equations using matlab.
Milan Padhiyar on 28 Dec 2020
We can solve the coupled ODE system by using ‘ode45’ in MATLAB. This function requires arguments as first-order ODE equations, time, and initial conditions. By looking into your equation, the state vector of this system will be [x, y, y_dot], where y_dot is the derivative of y with respect to t.
So you need to rewrite both equations in a form of a column vector consisting of first-order ODEs. The LHS of column vector should look like [x_dot, y_dot, y_ddot], where x_dot and y_dot are derivative of x and y with respect to t respectively, and y_ddot is derivative of y with respect to t.
Please refer to the below link for the examples on ‘ode45’.