In: Mechanical Engineering
Compute the length and absolute value of the following vectors:
a. x = [2, 4, 7]
b. y = [2, -4, 7]
c. z = [5 + 3i, -3 + 4i, 2 - 7i]
We need to compute the length and absolute values of the vector. The functions used are
For length, length(x)
For absolute value, abs(x)
(a)
Here we have vector
x = [2, 4, 7]
The MATLAB output is shown below:
We can see that our solution is
Length = 3
Absolute value = [2, 4, 7]
(b)
Now, our vector is:
y = [2, -4, 7]
The MATLAB output is shown below:
We see that our solution is
Length = 3
Absolute value = [2, 4, 7]
(c)
Now, our vector is
z = [5 + 3i, -3 + 4i, 2 – 7i]
The MATLAB command is shown below:
Our solution is
Length = 3
Absolute value = [5.8310, 5, 7.2801]
(a) Here we have vector
x = [2, 4, 7]
(b) Now, our vector is:
y = [2, -4, 7]
(c) Now, our vector is
z = [5 + 3i, -3 + 4i, 2 – 7i]