Question: Matlab Help This is my work so far, but i get an error (not enough input arguments) when i try to run the program function

Matlab Help

Matlab Help This is my work so far, but i get an

This is my work so far, but i get an error (not enough input arguments) when i try to run the program

function x=solveSys(A,B) switch nargin case 1 A=[3,-2,-4;-3,2,0;1,3,-1]; B=[9,7,9]; disp(solveSys(A,B)); case 2 A=[3, -1; -3, 5] B=[10, -4] disp(solveSys(A,B)); % Check for condition 1 case 3 [row,col]=size(A); (row~=col) %not equal display error disp('ERROR: A must be square'); return case 4 [rowB,colB]=size(B); (row~=colB) disp('ERROR: rows of B must match rows of A'); return end

Problem 2) Write a function n Matlab, x = solve sys (A, B) , where A s the matrix representing the coefficients of the unknowns of the systems of equations and B represents the vector of constants on the right-hand side. solveSys ) returns a vector solution, x, for all the the website). [30 pts] Use your function, solveSys to solve the following system of equations 3x-2y-4z = 9 -3x + 2y = 7 Add the ability for solveSys to detect if A is square and return an error if not: ERROR: A must be square". In addition, check for B matching the size of A, as well Return an error if not: ERROR: rows of B must match rows of A Problem 3) What is the solution (x.y,z)? [10 pts]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!