Created
May 10, 2021 08:58
-
-
Save cpellet/17638a2979a2649eef3106d575db0f50 to your computer and use it in GitHub Desktop.
Convergence: log(ek) vs k
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = np.arange(0,6,1) 2 x1=(1./2)**N | |
x2=(1./7)**N | |
x3 = (1./2) ** (2**N) | |
fig = plt.figure(figsize=(12, 8)) | |
plt.plot(N, x1, marker="o", label='error for $x_k$') | |
plt.plot(N, x2, marker="o", label=r'error for $\bar x_k$') | |
plt.plot(N, x3, marker="o", label=r'error for $\hat x_k$') | |
plt.legend(loc='lower left', fontsize=18) | |
plt.xlabel('k', fontsize=18) | |
plt.ylabel('$e_{k}$', fontsize=18) | |
plt.yscale('log') | |
plt.title('Convergence', fontsize=18) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment