Cody

# Problem 46716. Matrix with increasing numbers (★★★★)

Solution 3196421

Submitted on 13 Oct 2020 by Mehmet OZC
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, sign in.

### Test Suite

Test Status Code Input and Output
1   Pass
m = 3; n = 4; Z_correct = [1 2 3 4; 5 6 7 8; 9 10 11 12]; assert(isequal(your_fcn_name(m,n),Z_correct))

Z = 1 2 3 4 5 6 7 8 9 10 11 12

2   Pass
m = 2; n = 5; Z_correct = [1 2 3 4 5; 6 7 8 9 10]; assert(isequal(your_fcn_name(m,n),Z_correct))

Z = 1 2 3 4 5 6 7 8 9 10

3   Pass
m = 1; n = 8; Z_correct = [1 2 3 4 5 6 7 8]; assert(isequal(your_fcn_name(m,n),Z_correct))

Z = 1 2 3 4 5 6 7 8

4   Pass
m = 5; n = 1; Z_correct = [1 2 3 4 5]'; assert(isequal(your_fcn_name(m,n),Z_correct))

Z = 1 2 3 4 5

5   Pass
filetext = fileread('your_fcn_name.m'); assert(isempty(strfind(filetext, 'for')),'for forbidden') assert(isempty(strfind(filetext, 'while')),'while forbidden')

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!