Cody

Problem 44960. Rescale Scores

Solution 2489102

Submitted on 7 Jun 2020 by Anusha Gedela
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = [100 90 95 95; ... 70 50 60 60; ... 80 70 90 80]; y_correct = [100 90 95 3.5;... 70 50 60 0.0;... 80 70 90 2.0;]; assert(all(abs(rescale_scores(x) - y_correct) < 1e-3, 'all'))

X = 100.0000 90.0000 95.0000 3.5000 70.0000 50.0000 60.0000 0 80.0000 70.0000 90.0000 2.0000 X = 100.00 90.00 95.00 3.50 70.00 50.00 60.00 0 80.00 70.00 90.00 2.00

2   Pass
x = [54.0000 73.0000 97.0000 79.0000 60.0000 72.6000;... 61.0000 58.0000 89.0000 63.0000 65.0000 67.2000;... 90.0000 85.0000 74.0000 89.0000 74.0000 82.4000;... 42.0000 81.0000 72.0000 61.0000 93.0000 69.8000;... 50.0000 51.0000 65.0000 97.0000 59.0000 64.4000;... 79.0000 62.0000 75.0000 93.0000 61.0000 74.0000;... 84.0000 78.0000 76.0000 73.0000 58.0000 73.8000;... 79.0000 87.0000 91.0000 77.0000 61.0000 79.0000;... 67.0000 44.0000 90.0000 75.0000 72.0000 69.6000]; y_correct = [54.0000 73.0000 97.0000 79.0000 60.0000 1.2600;... 61.0000 58.0000 89.0000 63.0000 65.0000 0.7200;... 90.0000 85.0000 74.0000 89.0000 74.0000 2.2400;... 42.0000 81.0000 72.0000 61.0000 93.0000 0.9800;... 50.0000 51.0000 65.0000 97.0000 59.0000 0.4400;... 79.0000 62.0000 75.0000 93.0000 61.0000 1.4000;... 84.0000 78.0000 76.0000 73.0000 58.0000 1.3800;... 79.0000 87.0000 91.0000 77.0000 61.0000 1.9000;... 67.0000 44.0000 90.0000 75.0000 72.0000 0.9600]; assert(all(abs(rescale_scores(x) - y_correct) < 1e-3, 'all'))

X = 54.00 73.00 97.00 79.00 60.00 1.26 61.00 58.00 89.00 63.00 65.00 0.72 90.00 85.00 74.00 89.00 74.00 2.24 42.00 81.00 72.00 61.00 93.00 0.98 50.00 51.00 65.00 97.00 59.00 0.44 79.00 62.00 75.00 93.00 61.00 1.40 84.00 78.00 76.00 73.00 58.00 1.38 79.00 87.00 91.00 77.00 61.00 1.90 67.00 44.00 90.00 75.00 72.00 0.96 X = 54.00 73.00 97.00 79.00 60.00 1.26 61.00 58.00 89.00 63.00 65.00 0.72 90.00 85.00 74.00 89.00 74.00 2.24 42.00 81.00 72.00 61.00 93.00 0.98 50.00 51.00 65.00 97.00 59.00 0.44 79.00 62.00 75.00 93.00 61.00 1.40 84.00 78.00 76.00 73.00 58.00 1.38 79.00 87.00 91.00 77.00 61.00 1.90 67.00 44.00 90.00 75.00 72.00 0.96

Suggested Problems

More from this Author13

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!