1. This question is about solving a particular linear system in small steps, using two provided...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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] 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]
Expert Answer:
Related Book For
Value at Risk The New Benchmark for Managing Financial Risk
ISBN: 978-0071464956
3rd edition
Authors: Philippe Jorion
Posted Date:
Students also viewed these operating system questions
-
Student admissions process In order to apply for admission to I-PU, students first complete an online form, available via I-PUs website. Online applications are recorded in I-PUs Student Registration...
-
Create a BPMN model for the process in Exercise 1.1. Include business objects and annotations where appropriate. Exercise 1.1 Consider the following process for the admission of international...
-
Final Examination-Assessment 1-(Theory) Semester-Summer, 2019-20 Name of the Student: _________________ Register Number: _____________________ Carefully read the given CASE STUDY and Answer the...
-
Transactions related to revenue and cash receipts completed by Acheville Architects Co. during the period September 2-30, 2014, are as follows: Sept. 2. Issued Invoice No. 793 to Nickle Co., $5,200....
-
What are two types of departments found in a factory? What is the function or purpose of each?
-
Adam and Arin Adams have collected their personal income and expense information and have asked you to put together an income and expense statement for the year ended December 31, 2019. You have...
-
Over the past several years. Hobble, Inc. has expanded, diversified, and grown both in sales and in profits. Two years ago Hobble's management established an internal audit department that is...
-
As a buyer for a discount retail chain, you find yourself caught in a maelstrom. Just last month, your chain began selling an economy- priced line of clothing endorsed by a famous movie star. To be...
-
A. Describe what are: External Assessment' and 'Internal Assessment' B. What does 'external assessment' focus on? What does 'internal assessment' focus on?
-
Healthy Eating Foods Company is a distributor of nutritious snack foods such as granola bars. On December 31, 2016, the firms general ledger contained the accounts and balances that follow. ACCOUNTS...
-
How do I get 6% hydrogen peroxide from 30% hydrogen peroxide solution?
-
Explain why probit, or logit, is usually preferred to least squares when estimating a model in which the dependent variable is binary.
-
Give some examples of economic decisions in which the observed outcome is a choice among several alternatives, both ordered and unordered.
-
Explain how the fixed effects model allows for differences in the parameter values for each individual cross section in a data panel.
-
Describe the two-stage least squares estimation procedure for estimating an equation in a simultaneous equations model, and explain how it resolves the estimation problem for least squares.
-
Explain how a data panel differs from either a cross section or a time series of data.
-
As a newly promoted portfolio manager, you are given responsibility for a $100 million portfolio consisting of two assets: a zero-coupon bond with maturity of 7 years, and a perpetuity, each...
-
Draw two scatterplots, one for which r = 1 and a second for which r = 21.
-
Discuss why marking to market is the preferred method to value derivatives positions as opposed to methods based on historical costs.
-
Describe the management scheme of the virtual memory manager. How does the VM manager improve performance?
-
What are the various kinds of performance overheads associated with servicing an interrupt?
-
Determine an expansion for the work done in a steady flow adiabatic process.
-
In a cyclic process, heat transfers are \(+14.7 \mathrm{~kJ},-25.2 \mathrm{~kJ},-3.56 \mathrm{~kJ}\) and \(+31.5 \mathrm{~kJ}\). What is the net work for this cyclic process?
-
To cool water for drinking during summer, \(1 \mathrm{~kg}\) of ice at \(-2^{\circ} \mathrm{C}\) is mixed with \(5 \mathrm{~kg}\) of water at \(27^{\circ} \mathrm{C}\) in an insulated container...
Study smarter with the SolutionInn App