Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using MatLab .. I want to solve for these two problem Thank you 1. prob1.m Consi

ID: 3586373 • Letter: U

Question

Using MatLab .. I want to solve for these two problem

Thank you

1. prob1.m Consider the system of linear equation below: x-2 3y x+5y 18 6y + 10 = 4x Write code that has the following steps: a. Determine whether the system is under/over/uniquely determined. Check this with ranks and say in comments what type of system it is. b. Solve for x and y c. Check your answer. (Just leave the semicolon off your solutions to parts b and c) 2. prob2.nm Ihave two brothers (Jad and Rami), and, being a family of nerds, we never give our ages directly. We will, however, tell you how they are related: The sum of Jad and Rami's age is 28 more than mine alone The sum of the three ages is 96. The average of my age and Rami's age is Jad's age. . Write a program that solves for our ages and prints them to the command window.

Explanation / Answer

prob1.m:--

program:-

%in the given system of equations there are only two verables we have they
%are x,y so only two equations are enough for finding x,y i have taken
%first two x-2=3y and x+5y=18

A=[1 -3;1 5];   %Coeficient matrix A
B=[2;18];   %conistant matrix B
AB=[1 -3 2;1 5 18]; %AB matrix
ar=rank(A); %rank of A
abr=rank(AB);   %rank of AB
if(ar<abr) %check for no solution
    fprintf("System is under or has no solution ");
elseif(ar==2&&abr==2)   %check for unique solution
    fprintf("System is uniquely determined or has unique solution ");
else    %other wise infinite solution
    fprintf("System is over or has infinite solution ");
end
X = linsolve(A,B); %solution X for AX=B
disp(X);    %display solution

output:--

>> solve1
System is uniquely determined or has unique solution
     8
     2

>>

prob2.m:--

program:-

%jad + rami = 28+me; for convenience written as jad + rami - me = 28
%jad + rami + me = 96;
%(me + rami)/2 = jad; is same as me + rami = 2*jad; for convenience written as -2*jad + rami + me = 0;

A=[1 1 -1;1 1 1;-2 1 1]; %Coeficient matrix A
B=[28;96;0];    %conistant matrix B
X = linsolve(A,B); %solution X for AX=B
disp(X); %display solution

output:-

>> Mat_sol
    32
    30
    34

>>