Question: This is a Matlab problem. Please help me resolve the two assessments that I still have not passed. 23.66 General solution to linear set of
This is a Matlab problem. Please help me resolve the two assessments that I still have not passed.





23.66 General solution to linear set of equations LCTIVITY 23.66.1: General solution to linear set of equations This tool is provided by a third party. Though your activity may be recorded, a page refresh may be needed to fill the banner LAB 0/15 General solution to linear set of equations Write a function GetSolution to calculate the general solution Ax=b for a linear set of equations from a coeficient matrix A and a coefficient vector b. If the linear system does not have solution, a logical flag isConsistent should be set to true, and the solution vectors should be empty, else the logical flag isConsistent should be false. If a solution exists, the function GetSolution should calculate a particular solution vector by using the intrinsic function rref that implements the Gauss-Jordan algorithm and a homogeneous solution with the intrinsic function null to obtain a rational basis for the null space. For example: format rat >xp, xh, isInconsistent]-GeneralSolver (A, b) 26/3 3x0 empty double matrix isInconsistent logical and and >>xp, xh, isInconsistent]GeneralSolver(A, b) 4 isInconsistent logical and >>A [1,1,0,0;0,1,1,0;0,0,1,1;1,0,0,1]; b-[1000;1000;700;700]; >[xp,xh, isInconsistent]-GeneralSolver(A, b) xp= 700 300 700 isInconsistent logical and A[2 -1; 1 10; 1 2] ;b-ones (3,1); >>xp,xh, isInconsistent] GeneralSolver (A,b) Il Il logical xh= isInconsistent 1 Code to call your function C Reset 1 format rat 2 A [1,2,3;3,2,1;0,1,-1]; b [14;10;91 .3 [xp , xh, is1nconsistent] -GeneralSolve r (A, b) Run Function Previous Assessment: Incorrect Submit Test for unique solution Test 1 for solution with free variables Test 2 for solution with free variables 3 Test 3 for solution with free variables Failed free variable test for A [1,1,1, b [1:0: Test for an inconsistent case General test 1 3 General test 2 Failed general test for A [1 23;45 6]: b ones(2,1); Are the internal functions rref and null used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
