Matlab Help here some answers for Q8 8 B 2 4 6 810 D 16 3

Matlab Help

here some answers for Q8

8.

B = [2 4 6 810]

D =

16 3 18

17 20 23

2 15 22

so you can know if you r in the right track

Solution

ANSWER 8(a): To create matrix A, type:

A = [2 4 6 8 10; 1 12 19 7 9; 15 16 3 18 25; 11 17 20 23 13; 14 21 5 22 24]

ANSWER 8(b): Retriving Ist row of A, and storing it as vector B, Type:

B = [A(1,:)]

ANSWER 8(c): Retriving 3rd column of A, and storing it as vector C, Type:

C = [A(:,3)]

ANSWER 8(d): Retriving rows 3 through 5 and columns 2 through 4 of matrix A, and storing it as vector D, Type:

D = [A(3:5,2:4)]

ANSWER 8(e): Retriving 2nd column and 3rd row of matrix A, and storing it as vector E, Type:

E = vertcat(A(:,2),[A(3,:)].\')

Matlab Help here some answers for Q8 8. B = [2 4 6 810] D = 16 3 18 17 20 23 2 15 22 so you can know if you r in the right trackSolutionANSWER 8(a): To create m

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site