Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions