首页 > > 详细

MAT 128B Programming Project 2

 MAT 128B, Winter 2019

Programming Project 2
(due by Wednesday, February 20, 11:59 pm)
General Instructions
 You are required to submit each of your programming projects via le upload to Canvas.
Note that the due dates set in Canvas are hard deadlines. Submissions outside of Canvas or
after the deadline will not be accepted.
 Produce a single le for each Matlab function that you are asked to write and a single driver
le for each of the problems that you are asked to test your programs on. The driver les
should display all the quantities you are asked to print out. We will run these these driver
les to check your programs. Submit a complete set of your Matlab les as a single zip le.
When you prepare your zip le, please make sure that you zip just the Matlab les, rather
than a folder containing these les.
For this current project, you should submit a zip le of a total of 9 Matlab les: 6 les for
the functions LU N0 PIVOTING, LU WITH PIVOTING, L SOLVE, U SOLVE, INVERSE,
and COND INF and three driver les for Problems 1{3.
 Write a short report that includes a discussion of your results and explanations of runs for
which an algorithm has failed or produced inaccurate results.
 When you are asked to print out numerical results, print numbers in 16-digit 
oating-point format.
You can use the Matlab command \format long e" to switch to that format from Matlab's
default. For example, the number 10 would be printed out as 3.141592653589793e+01
in 16-digit 
oating-point format.
 For each programming project, upload two les: a zip le of a complete set of Matlab les
that lets us run your programs and a pdf le of your report.
The goal of this programming project is to implement the algorithms (as presented in class) for
LU factorization without pivoting and for PA = LU factorization with (partial) pivoting and to
employ these algorithms in the solution of systems of linear equations Ax = b, the computation of
the inverse A􀀀1 of A, and the computation of the condition number cond1(A) with respect to the
norm kk1. All your algorithms should also return the total number Noper of arithmetic operations
(additions, subtractions, multiplications, and divisions) used in your algorithm. Note that Noper is
a measure for the eciency of your implementations; implement each algorithm such that Noper is
as small as possible.
Write Matlab functions LU N0 PIVOTING, LU WITH PIVOTING, L SOLVE, U SOLVE, INVERSE,
and COND INF for computing the LU factorization, the PA = LU factorization, the
solution of lower-triangular systems, the solution of upper-triangular systems, the inverse of A, and
the condition number of A, respectively.
联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

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