title: 2dof mass spring damper system in python, odeint error
body: <p>I am a beginner who has just started Python.
  I chose to major in mechanical engineering and to program my mechanics calculations by studying Python. And now I am making a 2DOF mass-spring-damper model.
  I have found a model in 1DOF on the Internet, and (<a href="http://ifcuriousthenlearn.com/blog/2015/06/09/mechanical-vibrations-with-python/" rel="nofollow noreferrer">http://ifcuriousthenlearn.com/blog/2015/06/09/mechanical-vibrations-with-python/</a>) I want to apply this to implement 2DOF.</p>
  
  <p>But an error occurred.</p>
  
  <p>Here is the code and error.</p>
  
  <pre><code>import matplotlib.pylab as pylab
  from scipy.integrate import odeint
  from pylab import plot, xlabel, ylabel, title, legend, figure, subplot
  from pylab import cos, pi, arange, sqrt, array
  
      def MassSpringDamper(state1,state2,t):
  
      k1=124e3            # spring constant, kN/m
      k2=50e3  
      m1=10               # mass, Kg
      m2=20
      c1=5                # damping coefficient
      c2=3
  
      # unpack the state vector
      x1,x1d = state1 
      x2,x2d = state2     # displacement,x and velocity x'
  
      g = 9.8             # metres per second**2
  
      x1dd = (c1+c2)/m1*x1d-c2/m1*x2d+(k1+k2)/m1*x1-k2/m1*x2-g
      x2dd = -c2/m2*x1d+c2/m2*x2d-k2/m2*x1+k2/m2*x2-g
      return [x1d, x1dd, x2d, x2dd]
  
  state0 = [0.0, 1.2]     # initial conditions [x0 , v0]  [m, m/sec] 
  ti = 0.0                # initial time
  tf = 4.0                # final time
  step = 0.001            # step
  t = arange(ti, tf, step)
  state1 = odeint(MassSpringDamper, state0, t)
  state2 = odeint(MassSpringDamper, state0, t)
  x1 = array(state1[:,[0]])
  x1d = array(state1[:,[1]])
  x2 = array(state2[:,[0]])
  x2d = array(state2[:,[1]])
  </code></pre>
  
  <p>Error here.</p>
  
  <p><a href="https://i.stack.imgur.com/65ty7.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>TypeError: MassSpringDamper() missing 1 required positional argument: 't'</p>
  
  <p>how can i do?</p>
  
  <p>thanks for the reading my question.</p>