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

  Considered to equal when the result of one array subtract

Two arrays are considered to be equal when the result of one array subtracted from the other is an array of zeros. In the script file, create the MATLAB commands to prove the following relationships (use arrays that you makeup yourself)

  Determine the size for variables used in matlab program

If b=3, a=6 how many loops would the given program do? what will be the out put for z(4)? what would be size (in rows and columns) for variables z, i and b?

  Use matlab roots function to obtain the six roots

In the plot, you will see one root is obtained from an initial value that is close to another root. Can you explain by observing the plot why that is happening.

  Perform gauss-jordan elimination

Write a matlab function to perform gauss-jordan elimination with pivoting. Modify the pivoting so that it is using the row with the highest absolute value rather than the first non-zero row.

  The matlab language has the built-in ability

The MATLAB language has the built-in ability to perform mathematical operations on complex numbers. However there are times when it is useful to treat complex numbers as structures.

  Write mass balance equations for the remaining reactors

Write mass balance equations for the remaining 4 reactors. Put the known values in the 5 equations and convert each equation into a form where left hand side contains all the variables and the right hand side the constant term.

  Viewing the guided solutions for stormy attaway''s intro

I subscribed for a 7 day study membership trial 2 days ago. I have been viewing the Guided solutions for Stormy Attaway's Intro to programming in Matlab 2nd edition

  Prepare a program to enter a scalar value of temperature

Create a program that prompts the user to enter a scalar value of temperature. If the temperature is greater than 98.6°F, send a message to the command window telling the user that he or she has a fever.

  Write a program to compute a

Write a program to compute A. Test it with P = $55,000 and interest rate of 6.6% (i = 0.066). Compute results for n = 1, 2, 3, 4, and 5 and display the results as a table with headings and columns for n and A

  Biologically inspired method

Biological ly Inspired Methods + Ma tlab Assignmen t,  Define a problem of your choice which can be tackled by Biologically Inspired Methods. The problem must satisfy the following requirements

  Beginning with the row number passed

Write a MATLAB function that takes a matrix, a row number and a column number. Beginning with the row number passed to the function, scan down the column passed to the function and return the row number that contains the largest absolute value in ..

  Write a user defined function

Write a user defined function FindFrequency which inputs are a time and a wave elevation vector and output the approximated wave frequency (fappr=FindFrequency(t,eta)).

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