subject

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)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
Describe in pseudocode an algorithm that given an integer n and a linked list of elements increases the linked list by a factor of n by replacing each element in the original list with n copies of that element. for example, if l: [18, 7, 4, 24, 11] and n = 3 the resulting list should be l: [18, 18, 18, 7, 7, 7, 4, 4, 4, 24, 24, 24, 11, 11, 11]. if the value of n is less than or equal to 0, the list should be empty after the call. what’s the running time of your algorithm?
Answers: 3
question
Computers and Technology, 23.06.2019 00:30
Which of the following would you find on a network
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
The volume v and paper surface area a of a conical paper cup are given by where r is the radius of the base of the cone and h is the height of the cone. a. by eliminating h, obtain the expression for a as a function of r and v. b. create a user-de ned function that accepts r as the only argument and computes a for a given value of v. declare v to be global within the function. c. for v ! 10 in.3 , use the function with the fminbnd function to compute the value of r that minimizes the area a. what is the corresponding value of the height h? investigate the sensitivity of the solution by plotting v versus r. how much can r vary about its optimal value before the area increases 10 percent above its minimum value?
Answers: 1
You know the right answer?
Write an m-file that sorts a vector, x, and stores the sorted values in a vector, y. for example, if...
Questions
question
Health, 18.11.2020 09:10
question
English, 18.11.2020 09:10
question
Chemistry, 18.11.2020 09:20
Questions on the website: 13722359