Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please implement the functions in matlab. thanks. having hard time implementing this functions in matlab. 1) a,b,c and 2) thanks. 1. a function B =
please implement the functions in matlab. thanks.
having hard time implementing this functions in matlab. 1) a,b,c and 2) thanks.
1. a function B = interchange(A, ii) Input: a rectangular matrix A and two integersi and j. Output: the matrix resulting from swapping rows i and j, i.e. performing the row operation Ri> Ri. b. function B = scaling(A, i, s) Input: a rectangular matrix A, an integer i, and a scalar s.Output: the matrix resulting from multiplying all entries in row i by s, i.e. performing the row operation Riski. In each of these functions, you should check that the input indices , and are in range, 1.e. 1 sism and is ism, where m is the number of rows in the matrix (which may not be the same as the number of columns!). If any index is out of range, print an error using the built in function disp, and return the original matrix. This could help you diagnose problems when you write your RREF function in the next part There are two different ways one can implement Gauss Jordan elimination. . "The Row Reduction Algorithm first do Gaussian elimination then perform row operations equivalent to back substitution. . Gauss Jordan elimination can also be done in a single phase: every time you find a pivot, perform scaling so the pivot entry becomes 1, then perform elimination on all the other rows, both above and below the pivot row. 2. function R=yuref(A) Input: a rectangular matrix A. Output: the reduced row echelon form of A Partial pivoting: At each step, you should swap the current row with the one whose entry in the pivot column has the largest absolute value. c. function B = replacement(A1, s) Input: a rectangular matrix A, two integers i andj, and a scalar s.Output: the matrix resulting from addings times row jto row i, i.e. performing the row operation RiRi + sRi. Free variables: Due to numerical error, the entries in a column corresponding to a free variable may be extremely small but not precisely zero. Therefore, you should consider an entry to be zero if its absolute value is smaller than 10-12 Implementation tips: Implementation tipsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started