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

This is a Numerical Methods Question Solve using Matlab Question 4: (7 points) S

ID: 2290819 • Letter: T

Question

This is a Numerical Methods Question

Solve using Matlab

Question 4: (7 points) Solve the following complex system of equations via: (a) Cramer's rule with complex variables. (b) Converting the complex system of n equations into its equivalent real system of 2n equations. You may then use the built-in functions of any chosen mathematical software package (e.g., MATLAB, Excel, etc.) to solve this problem. Compare your results obtained in part (a) and part (b). 5+2 3 2-i] 1-5i 2 -3i 2 +ily = 3 + 2i L 7i 1+ 2i 4 + 2iLEJ ( 6i]

Explanation / Answer

clc
clear all
close all
A=[5+2*1j 3 2-1j; 2 -3*1j 2+1j;7*1j 1+2*1j 4+2*1j];
B=[1-5*1j;3+2*1j;6*1j];
del=det(A);
A1=[B A(:,2:3)];
del1=det(A1);
A2=[A(:,1) B A(:,3)];
del2=det(A2);
A3=[A(:,1:2) B];
del3=det(A3);
X1=del1/del
X2=del2/del
X3=del3/del
Xc=[X1;X2;X3];
fprintf('solution using Cramer s rule ')
disp(Xc)
X=inv(A)*B;
fprintf('solution using Matrix equations ')
disp(X)

Output:

solution using Cramer s rule

5.3077 - 4.4615i
-6.7692 + 1.1538i
-6.3077 - 1.5385i

solution using Matrix equations
5.3077 - 4.4615i
-6.7692 + 1.1538i
-6.3077 - 1.5385i

Both methods give same result.

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