13.07.2015 Views

An Integrated, Modular Simulation System for Education ... - Cal Poly

An Integrated, Modular Simulation System for Education ... - Cal Poly

An Integrated, Modular Simulation System for Education ... - Cal Poly

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

k4=dt*(z(index-1)+l3/2.0);l4=dt*(-a*(z(index-1)+l3/2.0)-b*(Theta(index-1)+k3/2.0)+K*c*deltaE);Theta(index) = Theta(index-1) + 1/6.0*(k1 + 2.0*k2 + 2.0*k3 + k4);z(index) = z(index-1) + 1/6.0*(l1 + 2.0*l2 + 2.0*l3 + l4);t = t + dt;Time(index)=t;index=index+1;end; %***** Outer loop *****plot(Time,Theta,’r’);xlabel(’Time - sec’);ylabel(’Theta’);grid on;92

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!