from numpy import * from dwt import * import matplotlib.pyplot as plt # Pythonkode oppgave 7 a, b = -5, 5 m = 8 t = linspace(a, b, (b-a)*2**m) invf = IDWTKernelN14N24 coordsvm = zeros((b-a)*2**m) coordsvm[0] = 1 IDWTImpl(coordsvm,m,invf,0,0) coordsvm *= 2**(m/2.) plt.subplot(1,2,1) plt.plot(t, concatenate([coordsvm[(b*2**m):((b-a)*2**m)], coordsvm[0:(b*2**m)]])) coordsvm = zeros((b-a)*2**m) coordsvm[b-a] = 1 IDWTImpl(coordsvm,m,invf,0,0) coordsvm *= 2**(m/2.) plt.subplot(1,2,2) plt.plot(t, concatenate([coordsvm[(b*2**m):((b-a)*2**m)], coordsvm[0:(b*2**m)]])) plt.show()