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: 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
Get step-by-step solutions from verified subject matter experts
