Newton’s second law establishes a relationship between the force 'F' acting on a body of mass 'm' and the acceleration 'a' caused by this force.
F = ma
The acceleration a of a body is directly proportional to the acting force F and inversely proportional to its mass m, that is
a = F/m
Assuming that the motion is one-dimensional, Newton’s second law is written as the second order differential equation:
Using ode45 which solves ordinary differential equations of order 1, I have solved and plotted the graphs.