Please use MATLAB and please answer all of the questions and please make sure th
ID: 3804549 • Letter: P
Question
Please use MATLAB and please answer all of the questions and please make sure that it is well commented. Thanks in advance !!
1. Generate random integers 10, 100, 1000, 10,000, and 100,000 starting from 1. (20 points) 2. Implement a test case to sort these numbers in increasing order using the following algorithms: Selection Sort and Quick Sort. (10 points) 3. Plot the running time against the length of the different randomly generated vectors. In your report explain your conclusions about the efficiency of various sorting algorithms based on their running (10 points) time. Note: The name of the class should be called Sort. The names of the three sorting methods should be called SelectionSort, QuickSort, and Merge Sort. Test case will be of this form Sort.Selectionsort(IVector of Random Integer) You can only pass one parameter which is the vector of random numbers to the sorting methods. The sort class implements only the default constructor with no input parameter Selection Sort (20 points): 1. Set the marker (U) for the unsorted section at the end of the list. 2. Repeat steps 3 -10 until the unsorted section has just one element. 3. Set the marker (L) or the largest so far at the beginning of the list. 4. Set the current marker (C) on the second element of the list. 5. Repeat steps 6-8 until C is to the right of U. 6. If the element at C is larger than the element at L then 7. Set L to the current position C. 8. Move C to the right one position. 9. Exchange the element at L with the element at U 10. Move U to the left one position. 11. Stop.Explanation / Answer
If the text includes a single quote, use two single quotes within the definition.
myText and otherText are arrays, like all MATLAB® variables. Their class or data type is char, which is short for character.
You can concatenate character arrays with square brackets, just as you concatenate numeric arrays.