% Example using dsolve with ezplot
% Need to clear variables before starting
clear
% Enter differential equation, where Dx represents x'.

sol=dsolve('Dx=2*sin(t)-4*x','x(0)=0','t');

% Plot solution in sol:
ezplot(sol,[0,10])

%Can add a label
ylabel('x')

% And a grid
grid

% An example of a second order equation is
%        sol2=dsolve('D2y+0*Dy+20*y=0','y(0)=5','Dy(0)=0');