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

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

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