Question: 1.a - Define a vector that contains [0,1,2,3,4,3,2,1,2,3,4,5,6,7,8,7,6,5,4]. Find local minimum and local maximum points on this vector. Hold their x and y coordinates. Plot

1.a - Define a vector that contains [0,1,2,3,4,3,2,1,2,3,4,5,6,7,8,7,6,5,4]. Find local minimum and local maximum points on this vector. Hold their x and y coordinates. Plot the graph of the vector and mark all local minimum and local maximum points you found. Define a series with the values of [0,1,2,3,4,3,2,1,2,3,4,5,6,7,8,7,6,5,4]. Find the local minimum and local maximum points in this array and keep the x and y coordinate values in separate sequences. Draw the graph of the sequence and write notes on the local minimum and local maximum points on the graph.

b - Define a vector that contains randomly generated 50 values. Find local minimum and local maximum points on this vector. Hold their x and y coordinates. Plot the graph of the vector and mark all local minimum and local maximum points you found. Take 50 separate values from the user and keep the values in an array. Find the local minimum and local maximum points in this array and keep the x and y coordinate values in separate sequences. Draw the graph of the sequence and write notes on the local minimum and local maximum points on the graph.

c Write a matlab program that finds all perfect numbers between 1 and 1000.

d - Write a matlab program that presents options as stone, paper, scissors and exit. If user selects one of first three options, the program should find winner and count winners number. The program should work until user selects exit option. If user selects exit option, game should finish and show how many times user wins and how many times computer wins.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!