Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Quiz # 2 Write a Matlab user defined function that takes the letter grades (ie. AABBC) as input and returns if the student entitled to

image text in transcribed
Quiz # 2 Write a Matlab user defined function that takes the letter grades (ie. AABBC) as input and returns if the student entitled to the honor list or not. The student is considered in the honor list he or she satisfies the following three conditions: An average GPA of 3.5 and above. At least two classes with A mark. no class with a mark less than C(.e. no D or F). The function returns either 1 or 0. A returned value of one means the student is in the honor list and a value of zero means the student is not in the honor list. You function name should be isHonor. Write a simple script that test your function. The formulas are: We assume the following values for the letter grades, and the corresponding formula for the GPA: A = 5, B = 4, C = 3 (D and F do not matter, since if we encounter them, the function should immediately return 0) GPA = (sum of all letter grade scores)/(number of classes) = (sum of all letter grade scores)/(number of letter grades) Sample output > > >isHonor("AABBC") ans = 1

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

Step: 3

blur-text-image

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

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

Students also viewed these Databases questions