Cody

Solution 1334306

Submitted on 10 Nov 2017 by yurenchu
  • Size: 15
  • This is the leading solution.
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)

ans = 1270

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

ans = NaN

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

ans = NaN

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

ans = 1.0350e+03

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

ans = 2.8475e+03

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

ans = 4.5341e+03

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

ans = 3.2944e+03

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

ans = 3.2993e+03

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

ans = 3.6286e+04

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

ans = 6.1442e+04

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

ans = 6.1442e+04

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

ans = 6.5498e+04