This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 1;
s_correct = 1;
assert(isequal(sumOfSeriesIV(n),s_correct))
k =
1
ans =
1
|
2 | Pass |
%%
n = 2;
s_correct = -8;
assert(isequal(sumOfSeriesIV(n),s_correct))
k =
1 2
ans =
-8
|
3 | Pass |
%%
n = 3;
s_correct = 17;
assert(isequal(sumOfSeriesIV(n),s_correct))
k =
1 2 3
ans =
17
|
4 | Pass |
%%
n = 4;
s_correct = -32;
assert(isequal(sumOfSeriesIV(n),s_correct))
k =
1 2 3 4
ans =
-32
|
960 Solvers
Return elements unique to either input
475 Solvers
We love vectorized solutions. Problem 1 : remove the row average.
381 Solvers
Switch matrix to a column vector
189 Solvers
07 - Common functions and indexing 3
254 Solvers