Zadanie 7 + 9

This commit is contained in:
s487174 2023-06-14 19:37:51 +02:00
parent 302e2d6133
commit 43da0d4a8e

View File

@ -51,7 +51,39 @@
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [] "source": [
"zb1=[(1,1),(2,3),(4,5)]\n",
"zb2=[(1,1),(2,3),(3,4),(4,5),(5,7),(6,9)]\n",
"\n",
"m1=matrix(3,2,[1,exp(1.0),1,exp(2.0),1,exp(4.0)])\n",
"m2=matrix(6,2,[1,exp(1.0),1,exp(2.0),1,exp(3.0),1,exp(4.0),1,exp(5.0),1,exp(6.0)])\n",
"\n",
"a,b,t=var('a,b,t')\n",
"\n",
"m1*vector([a,b])-vector([1,3,5])\n",
"m2*vector([a,b])-vector([1,3,4,5,7,9])\n",
"\n",
"\n",
"\n",
"M1=m1.transpose()*m1\n",
"M1.det()\n",
"\n",
"\n",
"\n",
"M2=m2.transpose()*m2\n",
"M2.det()\n",
"\n",
"\n",
"\n",
"M1^(-1)*m1.transpose()*vector([1,3,5])\n",
"\n",
"M2^(-1)*m2.transpose()*vector([1,3,4,5,7,9])\n",
"\n",
"\n",
"plot(1.64148598265947+ 0.0629860338045423*exp(t),(t,0,4))+sum([point(x) for x in zb1])\n",
"\n",
"plot(3.10041190358990+ 0.0163320609303546*exp(t),(t,0,6))+sum([point(x) for x in zb2])"
]
}, },
{ {
"attachments": {}, "attachments": {},
@ -66,7 +98,19 @@
"execution_count": null, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [] "source": [
"m=matrix(3,3,[1,1,0,1,2,2,0,2,3])\n",
"\n",
"eigenvalues = np.m.eigvals(matrix)\n",
"\n",
"eigen=m.right_eigenvectors()\n",
"e1=eigen[0][1][0]\n",
"e2=eigen[1][1][0]\n",
"print(e1.dot_product(e2))\n",
"e3=eigen[2][1][0]\n",
"print(e3.dot_product(e1))\n",
"print(e2.dot_product(e3))"
]
} }
], ],
"metadata": { "metadata": {