Cody

Problem 44960. Rescale Scores

Solution 2977900

Submitted on 22 Sep 2020
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   Fail
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 90 95 1 70 50 60 1 80 70 90 1

Assertion failed.

2   Fail
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 73 97 79 60 1 61 58 89 63 65 1 90 85 74 89 74 1 42 81 72 61 93 1 50 51 65 97 59 1 79 62 75 93 61 1 84 78 76 73 58 1 79 87 91 77 61 1 67 44 90 75 72 1

Assertion failed.

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!