Cody

Solution 2077805

Submitted on 3 Jan 2020
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
m = 3; n = 2; y_correct = [1 2; 4 8; 16 32]; assert(isequal(your_fcn_name(m,n),y_correct))

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-2. Error in your_fcn_name (line 7) m(i,:) = y(1:n) Error in Test1 (line 4) assert(isequal(your_fcn_name(m,n),y_correct))

2   Pass
m = 1; n = 1; y_correct = [1]; assert(isequal(your_fcn_name(m,n),y_correct))

m = 1 y = 1

3   Fail
m = 1; n = 5; y_correct = [1 2 4 8 16]; assert(isequal(your_fcn_name(m,n),y_correct))

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-5. Error in your_fcn_name (line 7) m(i,:) = y(1:n) Error in Test3 (line 4) assert(isequal(your_fcn_name(m,n),y_correct))

4   Fail
m = 3; n = 1; y_correct = [1; 2; 4]; assert(isequal(your_fcn_name(m,n),y_correct))

m = 1 y = 4 1 2 m = 1 4 y = 2 4 1 m = 1 4 2 y = 1 2 4

Assertion failed.

5   Fail
m = 4; n = 2; y_correct = [1 2; 4 8; 16 32; 64 128]; assert(isequal(your_fcn_name(m,n),y_correct))

Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 1-by-2. Error in your_fcn_name (line 7) m(i,:) = y(1:n) Error in Test5 (line 4) assert(isequal(your_fcn_name(m,n),y_correct))