Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
M = 1;
N = 1;
y_correct = [2];
assert(isequal(sumMyIndices(M,N),y_correct))
z =
2
x =
2
y =
2
|
2 | Pass |
M = 1;
N = 2;
y_correct = [2,3];
assert(isequal(sumMyIndices(M,N),y_correct))
z =
2 3
x =
2 3
y =
2 3
|
3 | Pass |
M = 3;
N = 2;
y_correct = [2,3; 3,4; 4,5];
assert(isequal(sumMyIndices(M,N),y_correct))
z =
2 3
x =
2 3
x =
2 3
3 4
x =
2 3
3 4
4 5
y =
2 3
3 4
4 5
|
4 | Pass |
M = 3;
N = 3;
y_correct = [2,3,4; 3,4,5; 4,5,6];
assert(isequal(sumMyIndices(M,N),y_correct))
z =
2 3 4
x =
2 3 4
x =
2 3 4
3 4 5
x =
2 3 4
3 4 5
4 5 6
y =
2 3 4
3 4 5
4 5 6
|
5 | Pass |
M = 4;
N = 5;
y_correct = [
2 3 4 5 6
3 4 5 6 7
4 5 6 7 8
5 6 7 8 9
];
assert(isequal(sumMyIndices(M,N),y_correct))
z =
2 3 4 5 6
x =
2 3 4 5 6
x =
2 3 4 5 6
3 4 5 6 7
x =
2 3 4 5 6
3 4 5 6 7
4 5 6 7 8
x =
2 3 4 5 6
3 4 5 6 7
4 5 6 7 8
5 6 7 8 9
y =
2 3 4 5 6
3 4 5 6 7
4 5 6 7 8
5 6 7 8 9
|
6 | Pass |
M = 5;
N = 8;
y_correct = [
2 3 4 5 6 7 8 9
3 4 5 6 7 8 9 10
4 5 6 7 8 9 10 11
5 6 7 8 9 10 11 12
6 7 8 9 10 11 12 13
];
assert(isequal(sumMyIndices(M,N),y_correct))
z =
2 3 4 5 6 7 8 9
x =
2 3 4 5 6 7 8 9
x =
2 3 4 5 6 7 8 9
3 4 5 6 7 8 9 10
x =
2 3 4 5 6 7 8 9
3 4 5 6 7 8 9 10
4 5 6 7 8 9 10 11
x =
2 3 4 5 6 7 8 9
3 4 5 6 7 8 9 10
4 5 6 7 8 9 10 11
5 6 7 8 9 10 11 12
x =
2 3 4 5 6 7 8 9
3 4 5 6 7 8 9 10
4 5 6 7 8 9 10 11
5 6 7 8 9 10 11 12
6 7 8 9 10 11 12 13
y =
2 3 4 5 6 7 8 9
3 4 5 6 7 8 9 10
4 5 6 7 8 9 10 11
5 6 7 8 9 10 11 12
6 7 8 9 10 11 12 13
|
Project Euler: Problem 3, Largest prime factor
379 Solvers
289 Solvers
Basics: 'Find the eigenvalues of given matrix
322 Solvers
Fahrenheit to Celsius converter
358 Solvers
274 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!