In: Mechanical Engineering
Suppose that x = -7 - 5i and y = 4 + 3i. Use MATLAB to compute
a. x + y
b. xy
c. x/y
(a)
Write a MATLAB code to compute the value of x + y.
>> x = -7-5i;
>> y = 4+3i;
>> x+y
MATLAB output:
ans =
-3.0000 - 2.0000i
Therefore, the value of x + y is -3 – j2.
(b)
Write a MATLAB code to compute the value of xy.
>> x = -7-5i;
>> y = 4+3i;
>> x*y
MATLAB output:
ans =
-13.0000 -41.0000i
Therefore, the value of xy is -13 – j41.
(c)
Write a MATLAB code to compute the value of x/y.
>> x = -7-5i;
>> y = 4+3i;
>> x/y
MATLAB output:
ans =
-1.7200 + 0.0400i
Therefore, the value of x/y is – 1.72 + j0.04.
Therefore, the value of x/y is – 1.72 + j0.04.