Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
P=3;
y_correct =[0,0,0;1,0,0;0,1,0;0,0,1;2,0,0;1,1,0; 1,0,1; 0,2,0; 0,1,1;0,0,2];
assert(isequal(index3d(P),y_correct))
|
2 | Pass |
P=2
y_correct=[0,0,0;1,0,0;0,1,0;0,0,1];
assert(isequal(index3d(P),y_correct))
P =
2
|
3 | Pass |
P=5
y_correct=[0 0 0;...
1 0 0;...
0 1 0;...
0 0 1;...
2 0 0;...
1 1 0;...
1 0 1;...
0 2 0;...
0 1 1;...
0 0 2;...
3 0 0;...
2 1 0;...
2 0 1;...
1 2 0;...
1 1 1;...
1 0 2;...
0 3 0;...
0 2 1;...
0 1 2;...
0 0 3;...
4 0 0;...
3 1 0;...
3 0 1;...
2 2 0;...
2 1 1;...
2 0 2;...
1 3 0;...
1 2 1;...
1 1 2;...
1 0 3;...
0 4 0;...
0 3 1;...
0 2 2;...
0 1 3;...
0 0 4;...
];
assert(isequal(index3d(P),y_correct))
P =
5
|
Find the numeric mean of the prime numbers in a matrix.
6782 Solvers
Extract leading non-zero digit
1205 Solvers
3974 Solvers
middleAsColumn: Return all but first and last element as a column vector
387 Solvers
206 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!