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

I need to do this question using matlab can someone please help me? Write a prog

ID: 3081253 • Letter: I

Question

I need to do this question using matlab can someone please help me? Write a program (linearsystems.m) that performs the following in sequence: (hint: use if state- ments) (i) Ask the user for a square matrix A[n

Explanation / Answer

function % GCD Greatest common divisor a = gcd(a,b) 18% gcd(a,b) is the greatest common divisor of% the integers a and b, not both zero. a = round(abs(a)); if a == 0 & b == 0 error('The gcd is not defined when both numbers are zero') else while b r = rem(a,b); a = b; end end b = round(abs(b)); 0=b = r; if x 0, dx = x/20; else, dx = 1/20; end = a = x - dx; b = x + dx; fa = feval(fun,a); fb = feval(fun,b); % Find change of sign. while (fa > 0) == (fb > 0) dx = 2.0*dx; a = x - dx; if (fa > 0) b = x + dx; end if trace, steps = [a fa; b fb]; end fa = feval(fun,a); (fb > 0), break, end = fb = feval(fun,b); % Main loop abs(b - a) > 2.0*tol*max(abs(b),1.0) while c = a + 0.5*(b - a); if trace, steps = [steps; [c fc]]; end if (fb > 0) == (fc > 0) else a = c; end end fc = feval(fun,c); b = c; fb = fc; fa = fc;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote