Question: Create a vector b 1 with the first values of vector a , i . e . , from element 1 to element . Create

Create a vector b1 with the first values of vector a, i.e., from element 1 to element .
Create a vector b2 with the last values of vector a, i.e., from element 2 to element .
Create a vector b3 with the elements of vector a from element 2 to element .
Create a vector b4 with the first and last elements of vector a.
Create a vector b5 with the elements of vector a in odd positions, i.e., elements 1,3,5,...
Create a vector b6 with the elements of vector a in positions descending in decrements of 3 from the end of vector a, i.e., elements ,,,...
Create a vector b7 as a copy of vector a with all elements less than 1 replaced with -1.
Create a vector b8 that contains all the values in a in the interval [-1,1] in ascending order.
Create a vector b9 that contains the values of the elements of vector a at positions [3,1,4,3,2] in this order.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!