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 239051

Submitted on 2 May 2013

Incorrect

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

Test Suite

Test
Code Input and Output
1
Fail
 
%%
m = 1; n = 1 ;
y_correct = 0;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
2
Fail
 
%%
m = 2; n = 2 ;
y_correct = 2;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
3
Fail
 
%%
m = 4; n = 3 ;
y_correct = 10;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
4
Fail
 
%%
m = 6; n = 5 ;
y_correct = 126;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
5
Fail
 
%%
m = 5; n = 5 ;
y_correct = 70;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
6
Fail
 
%%
m = 1; n = 100 ;
y_correct = 1;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
7
Fail
 
%%
m = 100; n = 1 ;
y_correct = 1;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
8
Fail
 
%%
m = 2; n = 100 ;
y_correct = 100;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
9
Fail
 
%%
m = 100; n = 2 ;
y_correct = 100;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.
10
Fail
 
%%
m = 15; n = 20 ;
y_correct = 818809200;
assert(isequal(paths2dest_ongrid(m,n),y_correct))
Error: Assertion failed.