Question: Problem 3 [12 marks] We want to write a function called Condition B inder which will use the built-in MATLAB cond and det functions to
![Problem 3 [12 marks] We want to write a function called](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3c09434bd4_58066f3c0942ff2c.jpg)

Problem 3 [12 marks] We want to write a function called Condition B inder which will use the built-in MATLAB cond and det functions to return the condition of a square coefficient matrix of a system of equations and the solution (if possible) to the user. We know that if a square coefficient matrix has a determinant of 0 , it is singular and non-solvable. The condition of a coefficient matrix ranges from 1 and , where a number close to 1 is far from being singular, and a large number means nearly singular. The condition number can be found using the built-in MATLAB cond function. Four example coefficient matrices and their corresponding b vectors have been given to you in the provided Q3_given.m file. Your function is to be defined as: function [condition, x]= ConditionFinder (A,b) Where A is a square coefficient matrix of any size up to 9x9 and b is the right-hand side vector array with appropriate size corresponding to A. The function will return condition, the condition number of the coefficient matrix A, and x, the solution to the system of equations (we know how to solve x for a system of equations in the form [A]{x}={b}). The function should have four distinct outcomes: i. If the condition = in f and the determinant =0, then the coefficient matrix is singular and non-solvable. Tell the user this and return the condition number. Hint: in this case (x) cannot be calculated, however the function will need something to be written to the x variable. In this case you can simply pass back zeros if you like. ii. If 5 condition
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
