You probably won't post a question here if you're searching on Google for "how to solve an ordinary differential equation (ODE) in MATLAB". There are two approaches: (1) Symbolic, and (2) Numerical. First things first are to recognize the type of ODE that you are attempting to solve. The ODE solvers cannot directly solve the ODE in the form posted in your image.
Therefore, the ODE has to be rearranged into this form:
so that the solver can perform the integration to obtain T_{J}(t)
is typically known as the non-zero external input to the ODE system, and it affects the behavior of
. In fact, T_{G} ccan be a non-zero constant, a time-varying function
, or a state-dependant function
. This type of ODE is known as the Non-homogeneous Differential Equation.For the numerical approach, you can code the ODE like this using the function method, and then apply (or 'call' in CS terminology) the ode45() function to solve the ODE, as demonstrated by @Sulaymon Eshkabilov. Search 'ode45' in MathWorks and post your code here so that we can check. function dTJdt = odefcn(t, TJ)