Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

22 and 23 1 Problems 18. Create a vector (name it vtA) that has 10 elements of which the first is 8 f vtA to

image text in transcribed
22 and 23
1 Problems 18. Create a vector (name it vtA) that has 10 elements of which the first is 8 f vtA to a increment is 7, and the last element is 71. Then, assign elements o new vector (call it vtB) such that vtB has 7 elements. The first 4 elements are the first 4 elements of the vector vta, and the last 3 are the last 3 elements of the vector vtA. Do not type the elements of vt.A vector explicitly. 19. Creato a vector (name it vetC) that has 12 elements of which the first is 5, the increment is 4 and the last element is 49. Then, by assigning elements o vetc to new vectors, create the following two vectors: (a) A vector (name it Codd) that contains all the elements with odd index o vctc; i.e., Codd-, 5 13 21 45 (b) A vector (aame it Ceven) that contains all the elements with even index ofvct; i.e., Ceven = 9 17 25 In both parts use vectors of odd and even numbers for the index of Codd and Ceven, respectively. Do not type the elements of the vectors explicitly. 49. 20. Create a vector (name it vctD) that of which the first is 0, the increment is 3 and the last element is 27. Then create a vector (name it va Dop) that consist of the elements of vetD in reverse order. Do it by ass elements of vctD to vctDop. (Do not type the elements of vctDop vector explicitly.) 21. Create the following matrix by using vector notation for creating vectors with constant spacing and/or the linspace command. Do not type individual elements explicitly 130 110 90 70 50 30, 10 A1 2.8333 4.6667 6.5 8.3333 10.1667 12 12 22 32 42 52 62 22. Create the following matrix by using vector notation for creating vectors with the linspace command. Do not type individual elements explicitly 5 2 3 1523 5 2 3 5 2 3 23. Create the following matrix by typing one command. Do not type individual elements explicitly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago