% ============================================================================================
% ===== Solving Higher Order Ordinary Differential Equations With MATLABs ODE45 Function =====
% ===== The Initial Higher Order Equation is:                                            =====
% =====                                              (d^2u/dt^2)=x+y                     =====
% ============================================================================================

clear
clc

InitialConditions=[0 1];
TimeInterval=0:0.1:1; %TimeInterval=[0 1];

[Time, Solution]=ode45('FunctionSolver',TimeInterval,InitialConditions,[]);

figure(1);
plot(Time,Solution(:,1)); %Plot Solution u
grid on

figure(2);
plot(Time,Solution(:,2)); %Plot Solution du/dt
title('Solution Using MATLABs ode45(  ) Function');
xlabel('Time');
ylabel('Y');
grid on