'How to solve ode equation which is written in matrix form by ode45 MATLAB?
I want to solve ode equation which is written in matrix form. A=[-0.0178 0 -10;0 -0.2352 10;1 -1 0];
and B=[0.3313 -8.9335;0 3.7245;0 0]
. Variables are x=[x1;x2;x3];
. Input are u=[v;f];
. xdot=[x1dot;x2dot;x3dot];
. Finally the ode becomes - xdot=Ax + Bu, initial conditions are x0=[0;0;0];
. Inputs are v=0.05 and f=0;
How to solve this equation through anonymus function by ode45. Another question is that if there is larger matrix say 100 order, then it is very difficult to write separate form then how can I solve if they are in particular form like xdot=Ax +Bu where xdot is n * 1, A is n * n, x is n * 1, B is n * m and u is m * 1.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|