2023 Question 1 Consider a set of N numbers myArray represented as a row vector which is not ordered Write | Assignment Collections
Computer Science 2023 Computer Programming – MATLAB
2023 Question 1 Consider a set of N numbers myArray represented as a row vector which is not ordered Write | Assignment Collections
Question-1: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.Question-2:Modify the function myStats (from question-1) and write myStats_2 so that the input argument k is optional. In case this argument is omitted, then the function myStats_2 returns the smallest and the largest element in the myArray.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_2 function with the appropriate input data. Also test various ways to call myStats_2.Question-3:Modify the function myStats_2 and write the function myStrings so that the function perform the same task with the myArray containing list of names(strings) instead of numbers.Write a script helpMyStrings.m which reads all the names in myArray and the value k from the user and displays the result by calling myStrings function with the appropriate input data. Also test various ways to call myStrings.
We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.