Open LinearSolver.ipynb with Jupyter Notebook. You are given a text file, eq.txt, containing a system of linear equations: x,y,z 2,1, -2,3 2x+1y-2z=3 1,-1,-1,0 which is equivalent to 1x-ly-1z = 0 1,1,3,12 1x + 1y +3z = 12 Part A Read the content of eq.txt and compute the following: o A Python list (not ndarray) called var containing the names of the unknowns. Example: [x, y, z) (Your solution should be general, i.e., it should work for any number of unknowns with arbitrary names.) o The ndarray A that will be used in solving the system via Numpy, as in: At = b (do not solve the system yet!) o The ndarray b that will be used in solving the system via Numpy, as in: At = b Your output should be as follows: VAF I'x', 'y', '2']

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Open
LinearSolver.ipynb
with Jupyter Notebook.
You are given a text file, eq.txt, containing a system of linear equations:
x,y,z
2,1, -2,3
2x + 1y-2z=3
1x-ly-1z = 0
1,-1,-1,0
which is equivalent to
1,1,3,12
1x + 1y +3z = 12
Part A
Read the content of eq.txt and compute the following:
o A Python list (not ndarray) called var containing the names of the unknowns.
Example: [x, y, z) (Your solution should be general, i.e., it should work for any
number of unknowns with arbitrary names.)
o
The ndarray A that will be used in solving the system via Numpy, as in: At = b (do
not solve the system yet!)
o
The ndarray b that will be used in solving the system via Numpy, as in: At = b
Your output should be as follows:
VAF
['x', 'y', '2'1
arrayti 2., 1., -2.1,
11.-1., 1.1.
[ 1., 1.2 3.11)
I
b
array([[ 3.1,
10.1.
112-113
Part B
Solve the system At= b using the A and b that you computed in Part A.
Your output should be as follows:
t
array([[3.5],
11. 1.
[2.511)
Transcribed Image Text:Open LinearSolver.ipynb with Jupyter Notebook. You are given a text file, eq.txt, containing a system of linear equations: x,y,z 2,1, -2,3 2x + 1y-2z=3 1x-ly-1z = 0 1,-1,-1,0 which is equivalent to 1,1,3,12 1x + 1y +3z = 12 Part A Read the content of eq.txt and compute the following: o A Python list (not ndarray) called var containing the names of the unknowns. Example: [x, y, z) (Your solution should be general, i.e., it should work for any number of unknowns with arbitrary names.) o The ndarray A that will be used in solving the system via Numpy, as in: At = b (do not solve the system yet!) o The ndarray b that will be used in solving the system via Numpy, as in: At = b Your output should be as follows: VAF ['x', 'y', '2'1 arrayti 2., 1., -2.1, 11.-1., 1.1. [ 1., 1.2 3.11) I b array([[ 3.1, 10.1. 112-113 Part B Solve the system At= b using the A and b that you computed in Part A. Your output should be as follows: t array([[3.5], 11. 1. [2.511)
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY