I have this question to which I have a partial answer to. Hope you would help me in doing the rest:
- Part A: Create a vector of random numbers of size 1×20, and name it as data. The values of these random numbers should be in the range between 0 and 1.
Answer:data=rand(1,20);
- Part B: Create a 1×10 vector and name it as half_data which consists of values from the first half of the vector data
- Part C:Create a 1×10 vector even_data which is composed of even-index elements of data.
Help me out do (part B) and (part C)