Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 196452

Submitted on 25 Jan 2013

Incorrect

10Size
Leading solution size is 13.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, log in.

Test Suite

Test
Code Input and Output
1
Fail
 
%%
assert(isequal(mystery(1),111))
Error: Assertion failed.
2
Fail
 
%%
assert(isequal(mystery(2),301))
Error: Assertion failed.
3
Fail
 
%%
assert(isequal(mystery(3),315))
Error: Assertion failed.
4
Fail
 
%%
assert(isequal(mystery(4),2301))
Error: Assertion failed.
5
Fail
 
%%
assert(isequal(mystery(5),2325))
Error: Assertion failed.
6
Fail
 
%%
assert(isequal(mystery(50),612))
Error: Assertion failed.
7
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]))
Error: The number of sites, 50, is incompatible with the number of values, 1.