Created
February 16, 2019 12:43
-
-
Save radzionc/9a5cedd15df5e96d3dbe4e77faf7138b to your computer and use it in GitHub Desktop.
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"x1 = 3.0\n", | |
"x2 = 4.0\n" | |
] | |
} | |
], | |
"source": [ | |
"a = [\n", | |
" [-1, 4, 1, 0],\n", | |
" [2, 1, 0, 1],\n", | |
" [0, 0, 1, 0],\n", | |
" [0, 0, 0, 1]\n", | |
"]\n", | |
"b = [13, 10, 0, 0]\n", | |
"x1, x2, x3, x4 = np.linalg.solve(a, b)\n", | |
"print('x1 =', x1)\n", | |
"print('x2 =', x2)" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment