Consider a set of n numbers myarray represented as a row


Consider a set of N numbers, myArray, (represented as a row vector) which is not ordered. Write a function myStats which takes myArray and an integer k such that 1=k=N and returns the kth largest and kth smallest element in myArray. Your function should ensure the function is called with valid number of arguments and the validity of the arguments itself. Also note that, you cannot use any built-in functions to order the elements within myArray. You should write your own code to order the data, if necessary.Write a script helpMyStats.m which reads all the elements of myArray and the value k from the user and displays the result by calling myStats function with the appropriate input data.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Consider a set of n numbers myarray represented as a row
Reference No:- TGS02253242

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)