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

2. Use Matlab to solve the following linear equation. 15x1 7 x2 + 29-0 5x2 + 9x3

ID: 3738701 • Letter: 2

Question

2. Use Matlab to solve the following linear equation. 15x1 7 x2 + 29-0 5x2 + 9x3 + 40 0 2x1 + 6 x2-7x3-20-0 Requirement: (1) Manually type the matrix and Matlab command: (2) Manually type the final solution.

Explanation / Answer

MATLAB CODE >> syms x1 x2 x3; >> equ1 = (15*x1) - (7*x2) + (0*x3) == -29; >> equ2 = (0*x1) + (5*x2) + (9*x3) == -40 ; >> equ3 = (2*x1) + (6*x2) - (7*x3) == 20 ; >> [A, B] = equationsToMatrix([equ1, equ2, equ3], [x1, x2, x3]) %% printting the matrixes A = (sym 3×3 matrix) ?15 -7 0 ? ? ? ?0 5 9 ? ? ? ?2 6 -7? B = (sym 3×1 matrix) ?-29? ? ? ?-40? ? ? ?20 ? >> sol = solve([equ1, equ2, equ3], [x1, x2, x3]); %% solving the equations for x1, x2 and x3 >> x1sol = sol.x1 %% printing the soultion x1, x2, and x3 x1sol = (sym) -3281 ?????? 1461 >> x2sol = sol.x2 x2sol = (sym) -326 ????? 487 >> x3sol = sol.x3 x3sol = (sym) -5950 ?????? 1461

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