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 196248

Submitted on 24 Jan 2013

Incorrect

28Size
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: Index exceeds matrix dimensions.
2
Fail
 
%%
assert(isequal(mystery(2),301))
Error: Index exceeds matrix dimensions.
3
Fail
 
%%
assert(isequal(mystery(3),315))
Error: Index exceeds matrix dimensions.
4
Fail
 
%%
assert(isequal(mystery(4),2301))
Error: Index exceeds matrix dimensions.
5
Fail
 
%%
assert(isequal(mystery(5),2325))
Error: Index exceeds matrix dimensions.
6
Fail
 
%%
assert(isequal(mystery(50),612))
Error: Index exceeds matrix dimensions.
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: Index exceeds matrix dimensions.