Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. This question is about solving a particular linear system in small steps, using two provided functions, elim and backsub. In the upcoming question

1. This question is about solving a particular linear system in small steps, using two provided functions, elim and backsub.

1. This question is about solving a particular linear system in small steps, using two provided functions, elim and backsub. In the upcoming question 2, you will use elim and backsub to write a solvers for general linear systems. In the present question, instead, you will become familiar with elim and backsub for a specific linear problem, as this will help you build the general solver. This question is answered by writing code directly in driver.m (no need to write a separate function). (a) Create the matrix that is the augmented matrix of the following system of equations: -2x1 + x 3x3 + 2x4 = 1 X1 - 2x + x3 + x4 = 1 x1 + x2 - 2x3 + x4 = -1 x1 + 2x2x3 + x = 1 (1) Use the MATLAB variable A for the matrix , and print it on screen. [1] (b) Write a MATLAB expression that is the part of corresponding to the coefficient matrix of the above system, and print the result on screen. [] (c) Write a MATLAB expression that is the part of A corresponding to the 3rd row of the coefficient matrix of the above system. Print the result on screen. [1] (d) Write a MATLAB expression that is the part of corresponding to the right hand side of the above system. Print the result on screen. [1] (e) Write a MATLAB expression that is the matrix consisting of rows 2 to 4 and columns 2 to 5 of . Print the result on screen. [1] (f) Download the MATLAB function elim, which is used as B=elim (A). This function carries out row operations to introduce zeros below the diagonal in the first column of a matrix A, using A(1,1) as pivot, and returns the result in B. Read elim.m, and use elim to eliminate the first column below row 1 of the matrix A. Store the result in A, that is, overwrite the original matrix. Print the new matrix A. [1] (g) Use the elim procedure to eliminate the second column below row 2 of the matrix obtained in question (f). Store the result in A. Note you must make sure you only change rows 2 to 4 and columns 2 to 5. Print the new matrix A. [1]

Step by Step Solution

3.54 Rating (192 Votes )

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Value at Risk The New Benchmark for Managing Financial Risk

Authors: Philippe Jorion

3rd edition

0070700427, 71464956, 978-0071464956

More Books

Students also viewed these Operating System questions