Cody

Solution 934936

Submitted on 11 Aug 2016
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
assert(isequal(mystery(1:5),[111 301 315 2301 2325]))

V = 1.0e+03 * Columns 1 through 17 0.1110 0.3010 0.3150 2.3010 2.3250 0.8090 2.1200 1.4130 1.4220 1.3200 0.7048 0.7048 0.7048 0.7048 0.7048 0.7048 0.7048 Columns 18 through 34 0.7048 0.7048 0.7048 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 Columns 35 through 50 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.8090 1.3190 1.2010 0.4050 0.6120

2   Pass
assert(isequal(mystery(6:10),[809 2120 1413 1422 1320]))

V = 1.0e+03 * Columns 1 through 17 0.1110 0.3010 0.3150 2.3010 2.3250 0.8090 2.1200 1.4130 1.4220 1.3200 0.7048 0.7048 0.7048 0.7048 0.7048 0.7048 0.7048 Columns 18 through 34 0.7048 0.7048 0.7048 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 Columns 35 through 50 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.8090 1.3190 1.2010 0.4050 0.6120

3   Pass
assert(isequal(mystery(46:50),[1809 1319 1201 405 612]))

V = 1.0e+03 * Columns 1 through 17 0.1110 0.3010 0.3150 2.3010 2.3250 0.8090 2.1200 1.4130 1.4220 1.3200 0.7048 0.7048 0.7048 0.7048 0.7048 0.7048 0.7048 Columns 18 through 34 0.7048 0.7048 0.7048 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 Columns 35 through 50 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.8090 1.3190 1.2010 0.4050 0.6120

4   Fail
x=1:50; m=mystery(x); assert(all(m==round(m))) y=spline(x,m,[12.5 37.5]); assert(all(y==[704.84846527373202 1283.5708406360138]))

V = 1.0e+03 * Columns 1 through 17 0.1110 0.3010 0.3150 2.3010 2.3250 0.8090 2.1200 1.4130 1.4220 1.3200 0.7048 0.7048 0.7048 0.7048 0.7048 0.7048 0.7048 Columns 18 through 34 0.7048 0.7048 0.7048 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 Columns 35 through 50 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.2836 1.8090 1.3190 1.2010 0.4050 0.6120

Assertion failed.

Suggested Problems

More from this Author10