Question: On MATLAB: 2. Definition: a vector v with n elements, n > 1, is increasing up to and including the k-the element if the following

On MATLAB:On MATLAB: 2. Definition: a vector v with n elements, n >

2. Definition: a vector v with n elements, n > 1, is increasing up to and including the k-the element if the following applies to the elements u; of v: Vi V2 = 33 Uk-1 = UK and, only in case k Vx+1 Example: the vector v = (-1.5, , 5, v29.5, 3.5, 127 , 49] is increasing up to and including the fourth element, hence k = 4. i) Define a function with input the vector v and as output the value of k for which the vector v is increasing up to and including the k-the element. You don't may use the commands break, return or continue or standard routines with the exception of length. The function must not display (any) results. ii) Test this function (on 'all' possible outcomes of k and at various values of n)

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!