Skip to content
Permalink
Browse files

added rotating pendulum

  • Loading branch information
rcc02007 committed Jan 31, 2018
1 parent f514f06 commit a85741e25000ff99d2ab4fd9d774e78eca0387e8
Showing with 349 additions and 0 deletions.
  1. +5 −0 ch_03/pend_rot.m
  2. +10 −0 ch_03/rotating_pendulum.m
  3. BIN octave-workspace
  4. +334 −0 rotating_pendulum.ipynb
@@ -0,0 +1,5 @@
function dy=pend_rot(t,y,l,w,a)
dy=zeros(size(y));
dy(1)=y(2);
dy(2)=-9.81/l*sin(y(1))+w^2*sin(y(1))*cos(y(1))+a*w^2/l*cos(y(1));
end
@@ -0,0 +1,10 @@

l=0.3;
a=1;
w=10;

my_ode=@(t,y) pend_rot(t,y,l,w,a)

[t,y]=ode23(my_ode,[0 2],[pi/6,0]);

plot(t,y(:,1))
BIN +69.2 KB (750%) octave-workspace
Binary file not shown.

0 comments on commit a85741e

Please sign in to comment.
You can’t perform that action at this time.