Python Forum
Simple animation -- time evolution of function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple animation -- time evolution of function
#1
I would like to animate how a function evolves over time. I would like to do this using only plt.blablabla, not ax.blablabla. The function is defined as follows:

import numpy as np
from scipy import special

y_lim=0.5
alpha=1

def pulse(t, x):
    return 1/2*(special.erf((y_lim-x)/np.sqrt(4*alpha*t))-special.erf((-y_lim-x)/np.sqrt(4*alpha*t)))
Reasonable ranges for x and t are:

max_iterations=200
t=np.linspace(0.0001, 3, max_iterations)
x=np.linspace(-3,3, max_iterations)
I appreciate any help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  simple function problem stereokim123 5 3,416 Aug-26-2021, 04:44 PM
Last Post: naughtyCat
  Python variable and function usage at a time prasanthbab1234 14 5,311 Sep-24-2020, 01:48 PM
Last Post: prasanthbab1234
  Simple time comparison superwave33 5 2,467 Apr-14-2020, 10:39 PM
Last Post: superwave33

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020