Question: Question 1: Assume that we want to create a vector of increasing integer values from min to max. We will write a function called creatvec

Question 1: Assume that we want to create a vector of increasing integer values from min to max. We will write a function called creatvec that receives two input arguments, min and max and returns a vector with values from min to max in steps of 1.

Question 2: consider the following scheme which maps an integer quiz grade to a corresponding letter grade: 9 or 10 is an A 8 is a B 7 is a C 6 is a D Anything below 6 is an F Write a function called letgrade which receives an integer quiz grade and returns a corresponding letter as per the scheme above. Also the function returns the letter X if the quiz grade is not valid. This can be implemented with if-else statements.

Question 3: Implement the function in Question 2 using switch statement

Question 4: In many applications, it is useful to determine whether numbers in a matrix are positive, zero or negative. Write a Matlab function called signum with input matrix and the function should outputs 1 if the matrix element is positive, 0 is the matrix element is 0 and -1 if the matrix element is negative.

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!