Cody

# Problem 8045. Gold Standard

Solution 2234282

Submitted on 25 Apr 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   Pass
HY = 2014; HV = 1270; CV_corr = 1270; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

2   Fail
HY = 500; HV = 50; CV_corr = NaN; assert(isnan(gold_standard(HY,HV)))

Array indices must be positive integers or logical values. Error in gold_standard (line 6) CV = 1270*HV/GV(HY - 1791 + 1); Error in Test2 (line 2) assert(isnan(gold_standard(HY,HV)))

3   Fail
HY = 2500; HV = 5000; CV_corr = NaN; assert(isnan(gold_standard(HY,HV)))

Index exceeds the number of array elements (224). Error in gold_standard (line 6) CV = 1270*HV/GV(HY - 1791 + 1); Error in Test3 (line 2) assert(isnan(gold_standard(HY,HV)))

4   Fail
HY = 2010; HV = 1000; CV_corr = 1035.04; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

5   Fail
HY = 2005; HV = 1000; CV_corr = 2847.53; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

6   Fail
HY = 2000; HV = 1000; CV_corr = 4534.09; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

7   Fail
HY = 1995; HV = 1000; CV_corr = 3294.42; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

8   Fail
HY = 1990; HV = 1000; CV_corr = 3299.3; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

9   Fail
HY = 1950; HV = 1000; CV_corr = 36285.71; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

10   Fail
HY = 1900; HV = 1000; CV_corr = 61441.7; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

11   Fail
HY = 1850; HV = 1000; CV_corr = 61441.7; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

12   Fail
HY = 1800; HV = 1000; CV_corr = 65497.68; assert(abs(gold_standard(HY,HV)-CV_corr)<2e-5)

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!