This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 1;
s_correct = 1;
assert(isequal(sumOfSquares(n),s_correct))
s =
1
|
2 | Pass |
n=3
s_correct=14
assert(isequal(sumOfSquares(n),s_correct))
n =
3
s_correct =
14
s =
14
|
2401 Solvers
How to find the position of an element in a vector without using the find function
2477 Solvers
725 Solvers
2338 Solvers
214 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!