Question: Using MATLAB write an m-file that sorts a vector, x, and stores the sorted values in a vector, y. For example, if x= [3,6,2,8,5,-3,2,0] your
Using MATLAB
write an m-file that sorts a vector, x, and stores the sorted values in a vector, y. For example, if x= [3,6,2,8,5,-3,2,0] your m-file should create the vector y with the following contents 1-3 -3,0,2,2,3,5,6,8] For the purpose of testing and grading your m-file: DO NOT define the matrix x within your m-file. That vector should exist in the workspace prior to executing your m-file. . Do not display y. This will be done by the script the grader uses to test your m-file Variable names (x, and y) must be exactly as specified (lower case)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
