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

Complete the following: Use MATIAB to write a script that solves for w. Define m

ID: 3783026 • Letter: C

Question

Complete the following: Use MATIAB to write a script that solves for w. Define matrix A as [1 2 3; 4 5 6; 7 8 9] and matrix B as [9 8 7; 6 5 4; 3 2 1]. x is equal to the value in the first row and second column of A. y is equal to the value in second row and third column of B. Vector u is equal to the third column of B, and vector v is equal to the second row of A. w is equal to x times u plus y times the transpose of v. Use MATIAB to write a script that solves for C. d is equal to the first row of A and e is equal to the third row of B. C is equal to d times the transpose of e.

Explanation / Answer

A=[1 2 3;4 5 6; 7 8 9;];
B=[9 8 7; 6 5 4;3 2 1;];
x=A(1,2);
y=B(2,3);
u=B(:,3);
v=A(2,:);
w=x*u + y*v';
x
y
u
v
w

Result :
>> chegg_matrix

x =

2


y =

4


u =

7
4
1


v =

4 5 6


w =

30
28
26


A=[1 2 3;4 5 6; 7 8 9;];
B=[9 8 7; 6 5 4;3 2 1;];
d=A(1,:);
e=B(3,:);
C=d*e';
C


Result:
>> chegg_matrix2

C =

10