10: Add more useful comments.
This commit is contained in:
@ -215,9 +215,10 @@
|
||||
" A = np.eye(m - 2)*2*(1 - λ**2) + ( np.eye(m - 2, m - 2, 1) + np.eye(m - 2, m - 2, -1) )*λ**2\n",
|
||||
" \n",
|
||||
" # Create empty matrix w for the result.\n",
|
||||
" # The boundary values at x[0] and x[-1] are taken care of this way, too.\n",
|
||||
" w = np.zeros((n, m))\n",
|
||||
" \n",
|
||||
" # Set initial values for w[0, i] and w[1, i].\n",
|
||||
" # Set initial values for w[0, i] and w[1, i] for all i except for the boundaries.\n",
|
||||
" w[0] = f(x)\n",
|
||||
" w[1, 1:m - 1] = (1 - λ**2)*f(x[1:m - 1]) + λ**2/2*f(x[2:m]) + λ**2/2*f(x[0:m - 2]) + k*g(x[1:m - 1])\n",
|
||||
" \n",
|
||||
|
||||
Reference in New Issue
Block a user