% pend.m function y=pend(t,x) % PEND(t,x) represents the system for the 2nd order ODE that describes the % pendulum. This function is used in ODE45. The matrix B is defined via % INITSYS.M global B y=B*[sin(x(1)); x(2)];