Question: Function Name: knitted Inputs: 2. (double) 1xM vector to be inserted in the odd position indices 3. (double) 1xN vector to be inserted in the

Function Name: knitted Inputs: 2. (double) 1xM vector to be inserted in the odd position indices 3. (double) 1xN vector to be inserted in the even position indices Outputs: 2. (double) 1xQ vector with input vectors "knitted" Background: Fall is in the air, so your new wardrobe will no longer do. It's time to trade in all your free FASET t-shirts for some handmade sweaters! Your job is to use MATLAB to knit together two input vectors. Function Description: Given two vectors, reverse the first input vector, sort the second, then output a larger vector where the values in the first vector are inserted in the odd indices and the values in the second vector are inserted in the even indices. If the two vectors are not the same length, the shorter vector should be extended by adding 1s to the end. Example: 2) sweater- knitted( [83, 67, 1, 7, 3, 1], sweater -- [1 1 3 2 7 3 1 4 67 1 83 11
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
