Links zu Dokumentationen/Tutorials für IPython/Python/numpy/matplotlib/git sowie die Sourcodes findet ihr im GitHub Repo.


In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

In [2]:
adaptive = np.loadtxt('data/ex17.out')
time = adaptive[:,0]
h = adaptive[:,1]
V1 = adaptive[:,2]
V2 = adaptive[:,3]

In [3]:
plt.plot(time, V1)
plt.ylabel(r'$V_{1}(t)$')
plt.xlabel(r'$t$')
plt.grid()



In [4]:
plt.plot(time, h)
plt.ylabel(r'$h(t)$')
plt.yscale('log')
plt.xlabel(r'$t$')
plt.grid()



In [5]:
eps2 = np.loadtxt('data/ex17_tol_e2.out')
eps3 = np.loadtxt('data/ex17_tol_e3.out')
eps4 = np.loadtxt('data/ex17_tol_e4.out')
eps5 = np.loadtxt('data/ex17_tol_e5.out')
eps6 = np.loadtxt('data/ex17_tol_e6.out')
tol = np.arange(2, 6);
V1_eps2 = eps2[-1:,2]
V1_eps3 = eps3[-1:,2]
V1_eps4 = eps4[-1:,2]
V1_eps5 = eps5[-1:,2]
V1_eps6 = eps6[-1:,2]
V1_err = np.array([V1_eps2 - V1_eps6, V1_eps3-V1_eps6, V1_eps4-V1_eps6, V1_eps5-V1_eps6])
V1_err = np.abs(V1_err)
plt.plot(tol, V1_err)
plt.ylabel('err')
plt.yscale('log')
plt.xlabel('tol 10^(.)')
plt.grid()



In [ ]: