This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 2;
y_correct = [-4 -3 -2 -1 0
-3 -2 -1 0 1
-2 -1 0 1 2
-1 0 1 2 3
0 1 2 3 4];
assert(isequal(your_fcn_name(n),y_correct))
ans =
[]
|
2 | Pass |
%%
n = 5;
y_correct = [-10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0
-9 -8 -7 -6 -5 -4 -3 -2 -1 0 1
-8 -7 -6 -5 -4 -3 -2 -1 0 1 2
-7 -6 -5 -4 -3 -2 -1 0 1 2 3
-6 -5 -4 -3 -2 -1 0 1 2 3 4
-5 -4 -3 -2 -1 0 1 2 3 4 5
-4 -3 -2 -1 0 1 2 3 4 5 6
-3 -2 -1 0 1 2 3 4 5 6 7
-2 -1 0 1 2 3 4 5 6 7 8
-1 0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9 10];
assert(isequal(your_fcn_name(n),y_correct))
ans =
[]
|
First non-zero element in each column
593 Solvers
Number of 1s in a binary string
2826 Solvers
405 Solvers
07 - Common functions and indexing 4
319 Solvers
904 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!