Cody

Problem 1219. Mystery problem

Solution 1995004

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

x = 1 2 3 4 5

Output argument "y" (and maybe others) not assigned during call to "mystery". Error in Test1 (line 1) assert(isequal(mystery(1:5),[111 301 315 2301 2325]))

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

x = 6 7 8 9 10

Output argument "y" (and maybe others) not assigned during call to "mystery". Error in Test2 (line 1) assert(isequal(mystery(6:10),[809 2120 1413 1422 1320]))

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

x = 46 47 48 49 50

Output argument "y" (and maybe others) not assigned during call to "mystery". Error in Test3 (line 1) assert(isequal(mystery(46:50),[1809 1319 1201 405 612]))

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]))

x = Columns 1 through 29 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Columns 30 through 50 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

Output argument "y" (and maybe others) not assigned during call to "mystery". Error in Test4 (line 2) m=mystery(x);