Q1 The following vector is defined in MATLAB: v = 15 0 6 -2 3 -5 4 9 1.8 -0.35 7 By hand (pencil and paper) write what will be displayed if the following com- mands are executed by MATLAB. Check your answers by executing the com- mands with MATLAB. (a) a-[v ([2 7:101);v ([3,5:7,21)] (b) b-[v ([3: 5,8])' v([10 6 4 1])' v (7:-1:4) ']

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section: Chapter Questions
Problem 4PP
icon
Related questions
Question
i need the answer quickly
Q1
The following vector is defined in MATLAB:
15 0 6-2 3-5 4 9 1.8 -0.35 7
By hand (pencil and paper) write what will be displayed if the following com-
mands are executed by MATLAB. Cheek your answers by executing the com-
mands with MATLAB.
(a) a=[v ([2 7:101);v([3,5:7,21)]
(b) b=[v ([3:5,8])' v([10 6 4 1])' v (7:-1:4) ')
Transcribed Image Text:Q1 The following vector is defined in MATLAB: 15 0 6-2 3-5 4 9 1.8 -0.35 7 By hand (pencil and paper) write what will be displayed if the following com- mands are executed by MATLAB. Cheek your answers by executing the com- mands with MATLAB. (a) a=[v ([2 7:101);v([3,5:7,21)] (b) b=[v ([3:5,8])' v([10 6 4 1])' v (7:-1:4) ')
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Computational Systems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr