Question: Write a Matlab function called peaks which will take two inputs: an array y and a scalar val. The function should have two outputs, both

 Write a Matlab function called peaks which will take two inputs:

Write a Matlab function called peaks which will take two inputs: an array y and a scalar val. The function should have two outputs, both arrays. The first output array ye. should consist of any values in the input array val. The second output array, yi, should contain the indices of y that correspond to each value in yp. Thus, for example, if y [-1.5 52 function should produce outputs yPL5 6.7] and yi=05]. Note that the input array y may have any length. which are greater than -5 GM and val-4 then the

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!