docs: example 5 validation updated.

This commit is contained in:
Fabian Joswig 2023-07-20 12:20:06 +01:00
parent 7f5373d5e4
commit 01ef97ffdf
No known key found for this signature in database

View file

@ -190,7 +190,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[7.2(1.7) -1.00(45)]\n"
"[7.2(1.7) -1.00(46)]\n"
]
}
],
@ -243,7 +243,7 @@
"output_type": "stream",
"text": [
"[[2.025(49) 0.0]\n",
" [-0.494(50) 0.870(29)]]\n"
" [-0.494(51) 0.870(29)]]\n"
]
}
],
@ -296,7 +296,7 @@
"output_type": "stream",
"text": [
"[[0.494(12) 0.0]\n",
" [0.280(40) 1.150(38)]]\n",
" [0.280(40) 1.150(39)]]\n",
"Check:\n",
"[[1.0 0.0]\n",
" [0.0 1.0]]\n"
@ -330,10 +330,10 @@
"output_type": "stream",
"text": [
"Eigenvalues:\n",
"[0.705(56) 4.39(20)]\n",
"[0.705(57) 4.39(19)]\n",
"Eigenvectors:\n",
"[[-0.283(26) -0.9592(75)]\n",
" [-0.9592(75) 0.283(26)]]\n"
"[[-0.283(26) -0.9592(76)]\n",
" [-0.9592(76) 0.283(26)]]\n"
]
}
],
@ -363,17 +363,13 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Check eigenvector 1\n",
"[-5.551115123125783e-17 0.0]\n",
"Check eigenvector 2\n",
"[0.0 -2.220446049250313e-16]\n"
"[[ True True]\n",
" [ True True]]\n"
]
}
],
"source": [
"for i in range(2):\n",
" print('Check eigenvector', i + 1)\n",
" print(matrix @ v[:, i] - v[:, i] * e[i])"
"print(matrix @ v == e * v)"
]
},
{