Question

Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final...

Matlab: As the user to input 4 quiz grades and 2 test grades. Calculate the final and letter grade when quizzes are worth 50% of the grade and each test is worth 25% of the grade. Display the final grade to the tenth along with the letter grade.

Homework Answers

Answer #1

//This is the code in MATLAB.

function [G,L]=final_grade(Q1,Q2,Q3,Q4,T1,T2) //Here G is the Final grade and L is the Letter for the Grade.

Quiz_score=(Q1+Q2+Q3+Q4)/4; // Q1,Q2,Q3,Q4 are the user Quiz Grades and T1,T2 are the test scores.

Quiz_Percentage=Quiz_score*(50/100);

Test1_Percentage=T1*(25/100);

Test2_Percentage=T2*(25/100);

G=Quiz_Percentage+Test1_Percentage+Test2_Percentage; // final grade percentage

if(G>=90 && G<=100)

{ L='A' ; }

elseif(G>=80 && G<90)

{ L='B' ; }

elseif(G>=70 && G<80)

{ L='C' ; }

elseif(G>=60 && G<70)

{ L='D' ; }

elseif(G>=50 && G<60)

{ L='E' ; }

else

{ L='F' ; }

Know the answer?
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
Similar Questions
Write a program using Matlab that asks the user for their last three grades and final...
Write a program using Matlab that asks the user for their last three grades and final grade and gives them their overall final grade. The three Midterms are worth 70% and Final is worth 30%. The program will display their Final grade with a grade letter corresponding to it. Run your program and verify that it operates correctly (hint: you might need to use “If, else statements”)
Create a program to calculate and print basic stats on a set of a given input...
Create a program to calculate and print basic stats on a set of a given input values representing students' scores on an quiz. 1) Ask the user for the total number of quiz scores to be input (assume a positive integer will be given). 2) Create an array to hold all the quiz scores and then get all the scores from input to put into the array. For example, if the user input 10 in step (1) then you should...
Write a program in C++ coding that asks the user to input an integer between 25...
Write a program in C++ coding that asks the user to input an integer between 25 and 50, inclusive. Utilize a WHILE loop to test for INVALID input. If the input is INVALID, the loop will repeat, and ask the user to try again. The pseudocode looks like this: Prompt user to input an integer between 25 and 50 Accept the input from the user Test for invalid input (HINT: use a while loop and the OR operator with 2...
Write a program that asks the user to input an integer between 25 and 50, inclusive....
Write a program that asks the user to input an integer between 25 and 50, inclusive. Utilize a WHILE loop to test for INVALID input. If the input is INVALID, the loop will repeat, and ask the user to try again. The pseudocode looks like this: Prompt user to input an integer between 25 and 50 Accept the input from the user Test for invalid input (HINT: use a while loop and the OR operator with 2 relational expressions. You...
4. While loops in MATLAB Get a binary from the user by input. And turn it...
4. While loops in MATLAB Get a binary from the user by input. And turn it into the decimal using while loop. (Hint: store the input binary as a character array and perform operation on each element). Finally, check the answer of your script with bin2dec.
An observed frequency distribution of the final grades of a class is as follows: Final Grade...
An observed frequency distribution of the final grades of a class is as follows: Final Grade AA A−A− B+B+ BB B−B− C+C+ CC C−C− DD FF Frequency (O) 50 53 47 50 54 50 46 44 54 52 At the 0.025 significance level, we wish to test the claim that the final grades of such a class occur with the same frequency. 1. The expected frequency is E=E= 2. Fill in the following table Final Grade Frequency (O) (O−E)2E(O−E)2E AA...
A college student took 4 courses last semester. His final grades, along with the credits each...
A college student took 4 courses last semester. His final grades, along with the credits each class is worth, are as follow: A (4), B (3), C (3), and D (2). The grading system assigns quality points as follows: A: 4; B: 3; C: 2; D: 1; and F: 0. Find the student’s GPA for this semester. Round your answer to the nearest thousandth (three decimals).
The professor of a Statistics class has stated that, historically, the distribution of final exam grades...
The professor of a Statistics class has stated that, historically, the distribution of final exam grades in the course resemble a Normal distribution with a mean final exam mark of μ=60μ=60% and a standard deviation of σ=9σ=9%. (a) What is the probability that a random chosen final exam mark in this course will be at least 73%? Answer to four decimals. equation editor (b) In order to pass this course, a student must have a final exam mark of at...
The professor of a Statistics class has stated that, historically, the distribution of test grades in...
The professor of a Statistics class has stated that, historically, the distribution of test grades in the course resembles a Normal distribution with a mean test mark of μ=61% and a standard deviation ofσ=9%. (a) What is the probability that a randomly chosen test mark in this course will be at least 73%? Answer to four decimals. (b) In order to pass this course, a student must have a test mark of at least 50%. What proportion of students will...
use matlab: ) Computing a distance and travel time between two locations. Obtain user input for...
use matlab: ) Computing a distance and travel time between two locations. Obtain user input for two variables, X and Y, which describe a coordinate location. Assume this coordinate is in units of miles. Write a script that : a) computes the distance D between the two points (0,0) and (X,Y) in kilometers. b) if D is greater than 5 kilometers, assume we drive at a speed of 40 km per hour. Otherwise, assume we walk at a speed of...