balanceGrades

balanceGrades - y=new_average-x  lculates the difference...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function curved_matrix=balanceGrades(matrix_original,new_average) %function to adjust the grades up or down such that the average of the %adjusted matrix is the target average; each grade in the matrix should be %adjusted by the same amount; grades above 100 are acceptable %usage: curved_matrix=balanceGrades(matrix_original,matrix_new) x=mean(mean(matrix_original)); %finds the average of the entire array; find mean(mean because it will give %the mean of the mean of the columns
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y=new_average-x; %calculates the difference between the desired average and the actual %average; the difference in the averages will be what needs to be added or %subtracted from each grade in order to achieve the new average curved_matrix=y+matrix_original; %adds the difference in averages to the original array of grades, which %will give the new array of grades required to obtain the desired average...
View Full Document

This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Tech.

Ask a homework question - tutors are online