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

Manipulating Matrices 4.1 Create the following matrices, and use them in the exe

ID: 3906411 • Letter: M

Question

Manipulating Matrices 4.1 Create the following matrices, and use them in the exercises that follow 15 3 22 3 8 5[12 18 5 2] 14 3 82 (a) Create a matrix called d from the third column of matrix a. (b) Combine matrix b and matrix d to create matrix e, a two-dimensional (c) Combine matrix b and matrix d to create matrix f, a one-dimensional (d) Create a matrix g from matrix a and the first three elements of matrix c, (e) Create a matrix h with the first element equal to as, the second ele- matrix with three rows and two columns. matrix with six rows and one column with four rows and three columns. ment equal to n2, and the third element equal to b

Explanation / Answer

Given: three matrices a, b and c

solving in MATLAB

a) to create a matrix d from the 3rd column of a

>>a = [15,3,22;3,8,5;14,3,82]

>>d = a(:,3);

o/p: d = [22;5;82]

b)to create e matrix which contains b and d

>>a = [15,3,22;3,8,5;14,3,82];

>>b=[1;5;6];

>>c=[12 18 5 2];

>>d = a(:,3);

>>e = [b,d];

o/p: e = 1 22

5 5

6 82

c) to create f which contains b and d as one column

>>a = [15,3,22;3,8,5;14,3,82];

>>b=[1;5;6];

>>c=[12 18 5 2];

>> f=[b;d];

o/p: f = 1

5

6

22

5

82

d)to create g from a and 1st three elements of c

>>a = [15,3,22;3,8,5;14,3,82];

>>b=[1;5;6];

>>c=[12 18 5 2];

>>g = [a;c(1,1),c(1,2),c(1,3)];

e)to create h matric from a13 , c12, and b21

>>a = [15,3,22;3,8,5;14,3,82];

>>b=[1;5;6];

>>c=[12 18 5 2];

>>h = [a(1,3),c(2,1),b(2,1)];

o/p: h = 22 18 5

Please like my answer if you are satisfied with it. Thanks!

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