Question: 4. Write a Matlab function called HW1P4 that is passed 2 column vectors. The function will take the square root of each element of the

 4. Write a Matlab function called HW1P4 that is passed 2

4. Write a Matlab function called HW1P4 that is passed 2 column vectors. The function will take the square root of each element of the first vector, subtract one half of the corresponding element of the second vector, and return the resulting vector. Put the function in a separate file. Show the code for the function and from the Matlab command window call the function with the first vector equal to [7; -3; 16) and a second vector equal to [29; -44; 32] and show the result

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!