21. Create a row vector vC=2:3:38 that has 13 elements. Then, create the following new vectors by...

Question:

21. Create a row vector vC=2:3:38 that has 13 elements. Then, create the following new vectors by assigning elements of vC to the new vectors:

(a) A vector (name it vCodd) that contains all the elements with odd index of vC; i.e., vCodd = 2 8 14 ... 38.

(b) A vector (name it vCeven) that contains all the elements with even index of vC; i.e., vCeven = 5 11 17 ... 35.

In both parts use vectors of odd and even numbers to address the elements of vC that are assigned to vCodd, and vCeven, respectively. Do not enter the elements of the vectors explicitly.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: