function mahalo1
    clear; clf;
    m=2;
    L=6;
    gamma=1;
    g=9.81;
    t0=0;
    tmax=50;
    h=0.1;
    phi0=pi/3;
    v0=0;
    t=t0:h:tmax;
    a=[];b=[];
    phi(1)=phi0;
    phi(2)=phi(1)+h*v0+h^2*(ff(t0,phi0,v0)/2);
    for j=2:length(t)-1
        phi(j+1)=2*phi(j)-phi(j-1)+h^2*ff(t(j),phi(j),(phi(j)-phi(j-1))/h);
    end
    x=L*sin(phi);
    y=-L*cos(phi);
    for k=1:length(t)
        subplot(2,2,1)
        plot(x(k),y(k),'ro','LineWidth',6)
        line([0,x(k)],[0,y(k)],'LineWidth',2)
        line([-L,L],[0,0],'LineWidth',4,'Color','k')
        axis([-L,L,-2*L,0])
        title('Mahalo')
        subplot(2,2,2)
        a=[a,t(k)];
        b=[b,phi(k)];
        plot(a,b)
        grid on
        axis([0,tmax,-2,2])
        title('angle')
        M(k)=getframe
        end
    movie(M,2)
    function n=ff(x,y,z)
        n=-(gamma/(m*L))*z-((g/L)*sin(y));
    end


end

