Question: MATLAB HELP PLEASE Directions: The following are sample problems that might come out during the exam. For now, as preparation, I encourage you to start

 MATLAB HELP PLEASE Directions: The following are sample problems that might

MATLAB HELP PLEASE

Directions: The following are sample problems that might come out during the exam. For now, as preparation, I encourage you to start theorizing about the algorithm of these problems. Sample outputs will not be given for now, but they will be provided during the exam. No submissions are required. These problems are for you to practice on. Good luck! "Practice makes perfect, you see, you have to practice if you want to be the best you can be. 1. Write a function called circle that takes a scalar input r. It needs to return an output called area that is the area of a circle with radius r and a second cutput, of that is the circunference of the same circle. You are allowed to use the built-in function pi. In fact, you need to use it to get the value of as accurately as possible. 2. The function move_me is defined like this: function w = move_re(va). The first input argument v is a rou-vector, while a is a scalar. The function moves every element of v that is equal to a to the end of the vector. For example, the command >> x = move_ne([1 2 3 4],2); makes x equal to [1 3 4 2]. If a is omitted, the function moves occurrences of zeros. 3. Write = function called even_index that takes a matrix, M, as input argument and returns a natrix that contains only those elements of that are in even rows and columns. In other words, it would return the elements of Mat indices (2,2), (2,4), (2,6), -, (4,2), (4,4), (4,6), -, etc. Note that both the row and the column of an element must be even to be included in the output. The following would not be returned: (1,1), (2,1), (1,2) because either the row or the column or both are odd. As an example, if M were 5-by-8 matrix, then the output must be 2-by-4 because the function onits rous 1, 3 and 5 of M and it also onits columns 1, 3, 5, and 7 of M. 4. Write a function called flip it that has one input argument, a row vector V, and one output argunent, a row vector that is of the same length as v. The vector w contains all the elements of v, but in the exact opposite order. For example, is v is equal to 1 2 3] then w must be equal to [3 2 1]. You are not allowed to use the built-in function flip, fliplr, or flipud

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!