Write a function called crazygrade that will take in the


Students are expected to submit properly commented script and/or function files that solve the problem stated. Do not submit your figure files. Your script and/or function files should automatically generate any figures required.

For each of the problems below, I want you to document the following:

1. Identify the problem statement

2. Define the inputs and outputs to each problem

3. Show a pseudo code design of the solution

4. Show that you have tested your MATLAB code appropriately

All of this should be documented separately from the MATLAB code in a Word document (.doc or .docx) or an Adobe Acrobat file (.pdf). Please don't use any other formats.

Problem: You have a big problem. In one of your other engineering courses, your professor decides the only way you will pass the class is if you write a function to get him out of a mess. All the grades in his class have been accidentally stored in one long string of characters containing only the letters A, B, C, D, F and Y.

a. Your job is to write a function called CrazyGrade that will take in the string and flip the grades according to the following specifications:

A becomes F

B becomes D

C remains unchanged

D becomes B F becomes A Y becomes W

Your function should take in a string as an input argument and return the inverted string as an output argument. You may assume that the input string will only consist of valid letter grades.

b. To make matters worse, he wants you to tell him his grade distribution. So write a second function GradeDist to return the number of A's, B's, etc. So if there are 4 A's, 16 B's, 18 C's, 10 D's, 4 F's, and 3 W's, your function should return [4 16 18 10 4 3].

Solution Preview :

Prepared by a verified Expert
MATLAB Programming: Write a function called crazygrade that will take in the
Reference No:- TGS0808338

Now Priced at $60 (50% Discount)

Recommended (96%)

Rated (4.8/5)