Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Help!! MATLAB question Thank you so much Normalize Grades Write a function norma

ID: 2249066 • Letter: H

Question

Help!! MATLAB question Thank you so much

Normalize Grades

Write a function normalizeGrades that receives a row array of test scores (arbitrary length, and positive values) and produces two outputs:

A row array array containing the grades normalized to a linear scale from 0 to 100.

The average of the normalized grades. Hint: Use the internal function mean to calculate the average.

Restriction: Loops may not be used. For example, following code

scores=[90, 45, 76, 21, 85, 97, 91, 84, 79, 67];

[grades,average]=normalizeGrades(scores)

produces:

grades=[92.78, 46.39, 78.35, 21.65, 87.63, 100, 93.81, 86.6, 81.44, 69.07]

average= 75.77

Explanation / Answer

Matlab Script:

function [grades,average]=normalizeGrades(scores)
grades = scores*100/max(scores);%calculates normalized values to a linear scale from 0 to 100
average = mean(grades);%gives the average
end

Command window output:

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote