Question
Numerical Methods (MatLab)
2 Required information Following is the scheme to assign letter grade to a numeric grade for students. Letter Criteria A 90 s
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Codes

clc
clear
ngrade=input('Enter numeric grade '); %saving numeric grade value
if (100>=ngrade) && (ngrade>=90) %comparing numeric grade value
lgrade='A'; %assigning letter grade
elseif (80<=ngrade)&&(ngrade<90)
lgrade='B';
elseif (70<=ngrade)&& (ngrade<=80)
lgrade='C';
elseif (60<=ngrade)&&(ngrade<70)
lgrade='D';
elseif 60>ngrade
lgrade='F';
end
  
fprintf('Letter grade is %s \n',lgrade) %printing letter grade   

Output 1

Enter numeric grade 70.0001
Letter grade is C

Output 2

Enter numeric grade 78
Letter grade is C

Add a comment
Know the answer?
Add Answer to:
Numerical Methods (MatLab) 2 Required information Following is the scheme to assign letter grade to a numeric grade f...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Create a program that takes a numerical score and outputs a letter grade. 2. In...

    1. Create a program that takes a numerical score and outputs a letter grade. 2. In this program, create two void functions titled makeScore and theGrade with an int argument. 3. The function makeScore should have a Reference parameter and theGrade should have a Value parameter. Note: Specific numerical scores and letter grades are listed below: 90-100 = Grade A 80-89 = Grade B 70-79 = Grade C 60-69 = Grade D 0-59 = Grade F 4. The function makeScore...

  • MATLAB Code: ?MATLAB Code: Write a function that converts a given letter grade it will print...

    MATLAB Code: ?MATLAB Code: Write a function that converts a given letter grade it will print its equivalence in numerical scale. For example if the user enters A, then your function should print a message stating that the grade must be between 90 and 100. B is between 80 and 89, etc. Everything under 60 is F. Use the switch-case function. Use fprintf to display the results on the screen.

  • Matlab The if family of statements is used most effectively when the input is a scalar....

    Matlab The if family of statements is used most effectively when the input is a scalar. Create a function to determine test grades based on the score and assuming a single input into the function. The grades should be based on the following criteria: Grade Score A B 90 to 100 80 to 90 70 to 80 60 to 70 с D E <60 Run your code for the following scores: 90, 75, 60 and 0.

  • Create a MIPS program that does the following: 4. Determine the letter grade a. Use the...

    Create a MIPS program that does the following: 4. Determine the letter grade a. Use the floating point calculated average to determine the letter grade. You will need to research the instructions to use to do comparisons with floating point numbers. (see Course Resources) b. Use the following chart: 90 - 100 80 - 89 70 - 79 ............. 60 - 69.............. <60 ..................... ............... 5. Display a message and the letter grade. 6. Your output should look similar to...

  • matlab 1. (5 pts) This question requires: matrix manipulation, single for loop, ifelse statement, data input,...

    matlab 1. (5 pts) This question requires: matrix manipulation, single for loop, ifelse statement, data input, m script file We have 80 number grades held in a matrix (grad m as you did the gradebook project in es MATLAB lab 1). The letter grades are given by following the rule: "A" 90)."B" 80), "C" P 70), "D" P 60), "F" (<60) and "S" "0): "S" standards for sick. Write one script file to Give the letter grade to EACH number...

  • In C Langage Write a grading program for a class with the following grading policies:- a. There are two quizzes, each gr...

    In C Langage Write a grading program for a class with the following grading policies:- a. There are two quizzes, each graded on the basis of 10 points. b. There is one midterm exam and one final exam, each graded on the basis of 100 points. c. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent and the two quizzes together count for a total of 25 percent. Grading system is as follows:-...

  • Microsoft Excel Question. I'm having trouble using the vlookup function, I have calculated a final numerical...

    Microsoft Excel Question. I'm having trouble using the vlookup function, I have calculated a final numerical grade for a hypothetical course, and and trying to use a set of numerical grades with their corresponding letter grades to get a vlookup function to return the letter grade from the numerical grade. However the function for some reason only returns the lowest value out of the set grades, not the closest match. Projects Classwork Teamwork/Integrity 100 100 A+ 98 A+ 97 A...

  • Below is a java program that inputs an integer grade and turns it into a letter...

    Below is a java program that inputs an integer grade and turns it into a letter grade. Update the below java code as follows and comment each line to explain what is happening: 1. Convert the if-else-if code block to a switch statement to solve the problem. 2. Use modulus to convert the grade input so that the range of grades are converted to one value. (comment the line) import java.util.Scanner; public class GradeLetterTest { public static void main(String[] args)...

  • A humanities professor assigns letter grades on a test according to the following scheme. The grade...

    A humanities professor assigns letter grades on a test according to the following scheme. The grade of an A is given to the top 13% of scores in the class. The grade of a B is given to the scores below the top 13% and above the bottom 60%. The grade of a C is given to the scores below the top 40% and above the bottom 24%. The grade of a D is given to the scores below the...

  • Suppose we have assigned grades for the 11 students in our data: Grade A for Students...

    Suppose we have assigned grades for the 11 students in our data: Grade A for Students who scored ≥ 90; B for students who scored ≥ 80 and < 90; C for students who scored ≥ 70 and < 80; D for students who scored ≥ 60 and < 70; F for students that scored < 60. Following the grade scheme, 7 students received an A; 1 student received a B; 0 students received a C; 0 students received a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT