MATLAB problem with Kapitsa pendulum(mostly about second order differentiation)

 PF Gold P: 162 MATLAB problem with Kapitsa pendulum(mostly about second order differentiation) The best thing to do when you're learning matlab is to find an example online and change it. So here is an example I found for ode45. In matlab go to file -> new -> function and then copy and past the below code into the file that comes up and save it as F.m. Of course you'll need to change the actual function to suit your needs. function xp=F(t,x) xp=zeros(2,1); % since output must be a column vector xp(1)=x(2); xp(2)=-t*x(1)+exp(t)*x(2)+3*sin(2*t); % don’t forget ; after each line