Write in MATLAB... C2-29 a Search 29. Create two row vectors: a 3 9 -0.5 3.6 1.5
ID: 3677425 • Letter: W
Question
Write in MATLAB...
C2-29 a Search 29. Create two row vectors: a 3 9 -0.5 3.6 1.5 -0.8 4 b 12 -0.8 6 2 5 3 -74 (a) Use the two vectors in a MATLAB command to create a 3x4 matrix such that the first row consists of elements 3 through 6 of vector a, the C2-29b Search second row consists of elements 4 through 7 of vector a, and the third row consists of elements 2 through 5 of vector b (b) Use the two vectors in a MATLAB command to create a 6 x2 matrix such that the first column consists of elements 2 through 7 of vector a, and the second column consists of elements 1 through 3 and 5 through 7 of vector b.Explanation / Answer
a=[3 9 -0.5 3.6 1.5 -0.8 4]
b=[12 -0.8 6 2 5 3 -7.4]
d=[a(3:6);a(4:7);b(2:5)]
e=[a(2:7);b(1:3),b(5:7)]'
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.