Write in MATLAB... 33. Create the following matrix A. 36 34 32 30 28 26 A 24 22
ID: 3677422 • Letter: W
Question
Write in MATLAB...
33. Create the following matrix A. 36 34 32 30 28 26 A 24 22 20 18 16 14 12 10 86 4 2 By writing one command and using the colon to address range of elements (do not type individual elements explicitly), use the matrix A to: (a) Create a six-element row vector named ha that contains the elements of the second row of A. (b) Create a three-element column vector named hb that contains the ele- ments of the sixth column of A. (c) Create a five-element row vector named hc that contains the first two ele- ments of the third row ofAand the last three element of the first row of A.Explanation / Answer
(a) ha = A(2:)
(b) hb = A(:6)
hb= transpose(hb) // to get a column vector
(c) c1= A(3:3,1:2)
c2= A(1:1 ,4:6 )
hc = [c1,c2]
for detail you can refer to these links:
http://www.tutorialspoint.com/matlab/matlab_vector_appending.htm
http://www.tutorialspoint.com/matlab/matlab_matrics.htm
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.