Tarea 5 Reloaded

parent d886a2d3
...@@ -950,7 +950,7 @@ ...@@ -950,7 +950,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": 2,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -959,7 +959,7 @@ ...@@ -959,7 +959,7 @@
"'b=mat2\\nprint(b)\\nzip_b = zip(*b)\\nfor col_b in zip_b:\\n print(col_b)\\n'" "'b=mat2\\nprint(b)\\nzip_b = zip(*b)\\nfor col_b in zip_b:\\n print(col_b)\\n'"
] ]
}, },
"execution_count": 3, "execution_count": 2,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1019,7 +1019,7 @@ ...@@ -1019,7 +1019,7 @@
"\n", "\n",
" if cols_A != fila_B:\n", " if cols_A != fila_B:\n",
" print (\"Imposible resolver, la dimensionalidad de las matrices no cuadra.\")\n", " print (\"Imposible resolver, la dimensionalidad de las matrices no cuadra.\")\n",
" return\n", " return (0)\n",
"\n", "\n",
" C = [[0 for fila in range(cols_B)] for col in range(fila_A)]\n", " C = [[0 for fila in range(cols_B)] for col in range(fila_A)]\n",
" print (C)\n", " print (C)\n",
...@@ -1055,7 +1055,7 @@ ...@@ -1055,7 +1055,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1084,7 +1084,7 @@ ...@@ -1084,7 +1084,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1096,13 +1096,13 @@ ...@@ -1096,13 +1096,13 @@
"Ingrese las columnas de la matriz: \n", "Ingrese las columnas de la matriz: \n",
"2\n", "2\n",
"Ingresa el valor del elemento0,0: \n", "Ingresa el valor del elemento0,0: \n",
"2\n", "10\n",
"Ingresa el valor del elemento0,1: \n", "Ingresa el valor del elemento0,1: \n",
"2\n", "20\n",
"Ingresa el valor del elemento1,0: \n", "Ingresa el valor del elemento1,0: \n",
"2\n", "30\n",
"Ingresa el valor del elemento1,1: \n", "Ingresa el valor del elemento1,1: \n",
"2\n" "40\n"
] ]
} }
], ],
...@@ -1155,7 +1155,7 @@ ...@@ -1155,7 +1155,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
...@@ -1168,10 +1168,10 @@ ...@@ -1168,10 +1168,10 @@
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"[[6, 6], [14, 14]]" "[[70, 100], [150, 220]]"
] ]
}, },
"execution_count": 7, "execution_count": 6,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1304,7 +1304,7 @@ ...@@ -1304,7 +1304,7 @@
" filas(): Un escalar\n", " filas(): Un escalar\n",
" columnas(): Un escalar\n", " columnas(): Un escalar\n",
" determinante(): Un escalar\n", " determinante(): Un escalar\n",
" gauss()\n", " gauss(): Regresa la matriz inversa o pseudo inversa, según el caso, por método de Gauss\n",
" \n", " \n",
" '''\n", " '''\n",
" def __init__ (self,matriz):\n", " def __init__ (self,matriz):\n",
...@@ -1452,25 +1452,6 @@ ...@@ -1452,25 +1452,6 @@
" return(\"Soy la matriz:\\n\"+ str(self.matriz))" " return(\"Soy la matriz:\\n\"+ str(self.matriz))"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"''' \n",
" else:\n",
" #original=self.matriz\n",
" #x=mmult1(original.T,self.matriz)\n",
" #x=Matriz(x)\n",
" #print(x)\n",
" #print(self.matriz)\n",
" #inve=x.gauss\n",
" #print(inve)\n",
" #mmult1(inve,original.T)\n",
" pass'''"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1545, "execution_count": 1545,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment