Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

2. What are your challenges in the creative process?

Answered: 1 week ago