Question: MATLAB Programming Assignment CSCI 2033 Assignment 1: The Reduced Row Echelon Form Due date: Thursday, October 5, 11:59 pm In this assignment, you will implement
MATLAB Programming Assignment






CSCI 2033 Assignment 1: The Reduced Row Echelon Form Due date: Thursday, October 5, 11:59 pm In this assignment, you will implement a MATLAB function to compute the RREF of a matrix, and use it to solve a real-world problem that involves linear algebra, namely GPS localization For each function that you are asked to implement, you will need to create a m file with the same name. For example, a function called ny_func must be defined in a file my_func.. In the end upload the zip file to the assignment submission page on you will zip up all your m fi files and Moodle. In this and future assignments, you may not use any of MATLAB's built-in linear algebra functionality like rref, inv, or the linear solve function A\b, except where explicitly permitted. However, you may use the high-level array manipu- lation syntax like A(i,:) and [A, B. See "Accessing Multiple Elements" and "Concatenating Matrices in the MATL.AB documentation for more information 1 Elementary row operations (3 points) As this may be your first experience with serious programming in MATLAB, we will ease into it by first writing some simple functions that perform the elementary row operations on a matrix: interchange, scaling, and replacement Speciflcation: function B-interchange (A, i, j) Input: a rectangular matrix A and two integers i and j Output: the matrix resulting from swapping rows i and j, i.e. performing the row operation R, R, 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. per- forming the row operation Ri 8Ri function B - replacement (A, i, j, s) Input: a rectangular matrix A, two integers i and j, and a scalar s Output: the matrix resulting from adding s times row j to row i, i.e. performing the row operation Ri Ri + sRi Implementation tips: In each of these functions, you should check that the input indices i and j are in range, i.e. 13 i ^ m and 1 jS m, where m is the number of rows in the CSCI 2033 Assignment 1: The Reduced Row Echelon Form Due date: Thursday, October 5, 11:59 pm In this assignment, you will implement a MATLAB function to compute the RREF of a matrix, and use it to solve a real-world problem that involves linear algebra, namely GPS localization For each function that you are asked to implement, you will need to create a m file with the same name. For example, a function called ny_func must be defined in a file my_func.. In the end upload the zip file to the assignment submission page on you will zip up all your m fi files and Moodle. In this and future assignments, you may not use any of MATLAB's built-in linear algebra functionality like rref, inv, or the linear solve function A\b, except where explicitly permitted. However, you may use the high-level array manipu- lation syntax like A(i,:) and [A, B. See "Accessing Multiple Elements" and "Concatenating Matrices in the MATL.AB documentation for more information 1 Elementary row operations (3 points) As this may be your first experience with serious programming in MATLAB, we will ease into it by first writing some simple functions that perform the elementary row operations on a matrix: interchange, scaling, and replacement Speciflcation: function B-interchange (A, i, j) Input: a rectangular matrix A and two integers i and j Output: the matrix resulting from swapping rows i and j, i.e. performing the row operation R, R, 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. per- forming the row operation Ri 8Ri function B - replacement (A, i, j, s) Input: a rectangular matrix A, two integers i and j, and a scalar s Output: the matrix resulting from adding s times row j to row i, i.e. performing the row operation Ri Ri + sRi Implementation tips: In each of these functions, you should check that the input indices i and j are in range, i.e. 13 i ^ m and 1 jS m, where m is the number of rows in the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
