首页 > > 详细

讲解Python程序、Python设计讲解、解析Python编程、LATEX编程辅导

You must show all steps and rst solve for L and U using pen and paper or LATEX.
2. (10 points) Now repeat the process of nding an inverse of the matrix in 1) using partioning of matrices.
3. (10 points) When a deep space probe is launched, corrections may be necessary to place the probe
on a precisely calculated trajectory. Radio telemetry provides a stream of vectors, x1;:::;xk , giving
information at di erent times about how the probe’s position compares with its planned trajectory. Let
Xk be the matrix [x1;:::;xk]. The matrix Gk = XkXTk is computed as the radar data are analyzed.
When xk+1 arrives, a new Gk+1 must be computed. Since the data vectors arrive at high speed,
the computational burden could be severe. But partitioned matrix multiplication helps tremendously.
Compute the column{row expansions of Gk and Gk+1 and describe what must be computed in order
to update Gk to form. Gk+1.
4. Find formulas for X;Y, and Z in terms of A;B; and C and justify your calculations. In some cases,
you may need to make assumptions about the size of a matrix in order to produce a formula. [Hint:
Compute the product on the left, and set it equal to the right side.]
5. (10 points) Let A be a lower triangular nXn matrix with nonzero entries on the diagonal. Show that
A is invertible and A 1 is lower triangular. [Hint: Explain why A can be changed into I using only row
replacements and scaling. (Where are the pivots?) Also, explain why the row operations that reduce A
to I change I into a lower triangular matrix.]
6. Solve the equation Ax = b by using the LU factorization given for A.
All matrices are in capital letters and bold. All vectors are in lower case and bold. All scalars are lower case and not
bolded.
yif you are not familiar with gsubmit, come to my o ce hours and I am happy to show you how it works. No email
submissions will be accepted
7. Create a Python le called question7.py and write the following functions:
(a) (5 points) def matrixMul(A, B):
’’’Returns the multiplication of matrix A and B.
If the Matrix A and B cannot be multiplied, return back suitable error message’’’
(b) (5 points) def matrixT(A):
’’’Returns the Transpose of the Matrix A’’’
(c) (5 points) def matrixAdd(A, B):
’’’Returns the addition of Matrix A and B.
If the Matrix A and B cannot be added, return back suitable error message’’’
You can test your code out as follows:
A = [[1, 3, 5], [2, 4, 7], [1, 1, 0]]
B = [[1, 2, 6], [2, 4, 7], [1, 1, 8]]
print matrixT(A) #This prints back the transpose of A
print matrixMul(A,B) #This prints back the multiplication of A and B
print matrixAdd(A,B) #This prints back the addition of A and B
You can visualize, the Python code i.e. list of list
A = [[1, 3, 5], [2, 4, 7], [1, 1, 0]]
as the following matrix: A=
A = [[1, 3, 5], [2, 4, 7], [1, 1, 0]]
B = [[1, 2, 6], [2, 4, 7], [1, 1, 8]]
print matrixMul(A,B) #This prints back the multiplication of A and B
For the above test case, your code will print out the following:
[[12, 19, 67], [17, 27, 96], [3, 6, 13]]
Page 2
A = [[1, 3, 5], [2, 4, 7], [1, 1, 0]]
B=[[1], [1], [1]] #This is a column vector
print matrixMul(A,B)
For the above test case, your code will print out the following:
[[9], [13], [2]]
Make sure to use Python 2.7.x when writing your code.
Note
There is 10% bonus, if you submit your assignment using LATEX. We expect to see a .tex le and a .pdf le
as part of your submission. You must show all the steps in detail and decent formatting.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!