Question: Question 2 (25 Points) - Write a matlab function that accepts one vector parameter and one scalar parameter as input parameters and returns a 1x2

 Question 2 (25 Points) - Write a matlab function that accepts

Question 2 (25 Points) - Write a matlab function that accepts one vector parameter and one scalar parameter as input parameters and returns a 1x2 vector as an output parameter. Function should find whether scalar parameter exists in vector parameter or not. If scalar parameter exists in vector parameter, function returns an output as I and first index of scalar parameter. If scalar parameter does not exist in vector parameter, function returns 0,0. Finally, you should call the function which you defined in command window. Hint: 4 examples are given below for you to understand the question better. Vector parameter Scalar parameter Output parameter Example 1 5.2.8.4.6,01 0 Example 2 5.2.8.4.6.0) Example 3 [0.-2.5.61 1.2 Example 4 [0,-2,5,6) 0,0 1,6 0.0 1 -2 7

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!