Python, Physics, Math, Statistics, Computer Science.
scipy.sparse.identity(N-1) for i in range(0,N): P[i+1,1:M] = (inv(identity - dt*lmbda)).dot( P[i,1:M] ) return P.T, t, X P,t,X = simulate_fokker_planc(0,1,1,2,80,80) # this is to plot a 3D graph.a t_mesh, X_mesh = np.meshgrid(t,X) ax = plt.gca(projection='3d') ax.plot_surface(X_mesh, t_mesh, P