title: How to plot function of an array or alternative?
body: <pre><code>plt.plot(time,phi(time))
  </code></pre>
  
  <p>isnt working... whyyyyy????</p>
  
  <p>tried to apply the function individually</p>
  
  <pre><code>import numpy as np import matplotlib.pyplot as plt
  
  g = 9.81 l = 2 mu = 0.1
  
  PHI_0 = np.pi / 3 PHI_PUNKT_0 = 0
  
  def berrechne_phi_zwei_punkt(phi, phi_punkt):
     return -mu * phi_punkt - (g/l) * np.sin(phi)
  
  def phi(t):
     phi = PHI_0
     phi_punkt = PHI_PUNKT_0
     delta_t = 0.001
     for time in np.arange(0,t,delta_t):
      phi_zwei_punkt = berrechne_phi_zwei_punkt(
        phi, phi_punkt
      )
      phi += phi_punkt * delta_t
      phi_punkt += phi_zwei_punkt * delta_t
     return phi
  
  delta_t2 = 0.1
  t_max = 10
  time = np.arange(0, t_max+delta_t2 , delta_t2)
  print(time)
  
  plt.plot(time,phi(time))
  
  plt.savefig('graph.png')
  </code></pre>
  
  <p>I want the correct plot of the function but it outputs "The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()"</p>