Question: This is a matlab question. Function Name: bothHalves Inputs: [1xN Double] A vector Output: [1xN/2 Double] First half [1xN/2 Double] Second half Description: Write a

This is a matlab question. Function Name: bothHalves Inputs: [1xN Double] A vector Output: [1xN/2 Double] First half [1xN/2 Double] Second half Description: Write a function called bothHalves that takes in a vector (of even length) and has 2 outputs. The first output should be the first half of the vector and the second output should be the second half of the vector.

This is a matlab question. Function Name: bothHalves Inputs: [1xN Double] A

Function Name: bothHalves Inputs: 1. [ 1xN Double] A vector Output: 1. [1xN/2 Double] First half 2. [1xN/2 Double] Second half Description: 1. Write a function called bothHalves that takes in a vector (of even length) and has 2 outputs. The first output should be the first half of the vector and the second output should be the second half of the vector. Examples: [ans1a, ans1b] = bothHalves ([2345]) >>ans1a=[23] >> ans1b =[45] [ ans2a, ans 2b]= bothHalves ([109]) >> ans2a =10 > ans 2b=9 [[ans3a,ans3b]= bothHalves ([123456]) > ans3a =[123] > ans3b =[456]

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 Databases Questions!