This solution is outdated. To rescore this solution, sign in.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = magic(4);
y_correct = [34;34;34;34]
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
34
34
34
34
ans =
34
34
34
34
|
2 | Pass |
x = pascal(7);
y_correct =[7;28;84;210;462;924;1716];
assert(isequal(your_fcn_name(x),y_correct))
ans =
7
28
84
210
462
924
1716
|
3 | Pass |
x = [5 -1 7 5;3 10 23 5;0 -3 7 5]
y_correct =[16;41;9];
assert(isequal(your_fcn_name(x),y_correct))
x =
5 -1 7 5
3 10 23 5
0 -3 7 5
ans =
16
41
9
|
Find the longest sequence of 1's in a binary sequence.
3369 Solvers
Find the sum of the elements in the "second" diagonal
994 Solvers
464 Solvers
Calculate the area of a triangle between three points
871 Solvers
Area of an equilateral triangle
2759 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!