tags:

views:

69

answers:

2

You are given a vector of test scores called tests, and wish to normalize these scores by computing a new vector, normTests, which will contain the test scores on a linear scale from 0 to 100. A zero will still correspond to zero, and the highest test score will correspond to 100. For example, if the highest score in the original data was 50, then all scores would be doubled.

+3  A: 

I don't know MATLAB very well, but what you want to do is something like

normTests = (tests / max(tests))*100

Dividing the test scores by the maximum will produce a linear scale between 0 and 1, multiplying by 100 brings it back to 0 to 100

Winston Ewert
Thanks a lot. You are awesome!
Jack Lu
+1  A: 

Multiply the vector by 100/x, where x is the maximum value in the vector.

Turtle

related questions