Write a function called crazygrade

Assignment Help MATLAB Programming
Reference no: EM13540407

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].

Reference no: EM13540407

Questions Cloud

Explain how would the geometry of the product change : How would the geometry of the product (isoborneol) change (OH in an endo or exo position) if all the methyl groups of camphor were replaced with H
Find the magnitude of the magnetic flux through the core : The magnetic field produced by an MRI solenoid 2.7m long and 1.7m in diameter is 1.9T. Find the magnitude of the magnetic flux through the core of this solenoid
Find her average speed assuming the acceleration was unifrom : Slamming on the brakes, a driver decelerates her car from 25.0 m/s to 15 m/s in 3.5 s. Find her average speed assuming the acceleration was unifrom.
What is the magnitude of the emf in millivolts : An astronaut who is repairing the outside of her spaceship accidentally pushes away a 96.7-cm-long steel rod, What is the magnitude of the EMF, in millivolts, induced between the ends of the rod
Write a function called crazygrade : Write a function called CrazyGrade that will take in the string and flip the grades according to the specifications - Define the inputs and outputs to each problem
Determine what is the bits angular speed : The drill bit of a variable-speed electric drill has a constant angular acceleration of 3.15 rad/s2. The initial angular speed of the bit is 5.95 rad/s. what is the bit's angular speed
Explain the actual chemcial ph indicators in red cabbage : Why does red cabbage take on a red coloration in a vinegar and oil salad dressing? A purple coloration when fresh. A blue coloration when exposed to dish soap.
Find the time required for the flywheel to come to rest : A flywheel has a constant angular deceleration of -2.36 rad/s2. Find the time required for the flywheel to come to rest
Calculate how long will it be before they meet : Two people start at the same place and walk around a circular lake in opposite directions. How long will it be before they meet

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Write a single program that calculates the geometric mean

Use MATLAB to write a single program that calculates the geometric mean, RMS average and harmonic mean for a set of numbers. Compare these values for each of the following sets of number.

  Plot the pressure surface versus latitude and longitude

Plot the pressure surface versus latitude and longitude as a surface plot

  Compute the power spectral density vector

Compute the power spectral density vector. Plot the spectrogram using the same parameters as in lecture.

  Kerfuffleboard is a game very much like shuffleboard

Kerfuffleboard is a game very much like Shuffleboard. Players take turns shooting disks at a trianglular scoring area. While the scoring areas are the same in shuffleboard and kerfuffleboard, a disk's contribution to a player's score will be calcu..

  Create a function that returns true i

Create a function that returns true if the input is a numeric matrix and false otherwise.

  Matlab code to solve for temperature and pressure variation

Write down the MATLAB code to solve for temperature and pressure variation throughout the expansion process and to evaluate work and heat produced in processes for variable values of n.

  Write a system program for bus arbiter

The bus arbiter is a device used in multi-master system with shared bus. It is used to allocate the control of the shared system bus to one master at a time depending priority.

  Write a function that collects integers from the user until

Write a function that collects integers from the user until a 0 is encountered and returns them in a list in the order they were input (ML only).

  Z-transform in matlab

Z-Transform in MATLAB, Sketch the z-plane pole-zero plot and determine the stability status for the following digital system. Determine the h(n) in MatLab.

  An image histogram for a color image

goal is to build an image histogram for a color image based on its 6-bit color code.

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Error between the exact solution and explicit solution

Calculate the error between the exact solution and explicit solution and draw the exact solution and compare the results.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd