Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
filetext = fileread('summ.m');
assert(isempty(strfind(filetext, 'regexp')),'regexp hacks are forbidden')
|
2 | Pass |
v = randi(10, 1, randi(10));
s = summ(v);
assert(length(s) == length(v) - 1)
|
3 | Pass |
v = 1:10;
s_correct = 3:2:19;
assert(isequal(summ(v),s_correct))
|
4 | Pass |
v = [1; 2; 4; 4; 5; 8];
s_correct = [3; 6; 8; 9; 13];
assert(isequal(summ(v),s_correct))
|
1223 Solvers
Duplicate each element of a vector.
518 Solvers
Find Out sum of principal diagonal element of given matrix
194 Solvers
Matlab Basics II - Extract last 3 elements of a vector
164 Solvers
Compute LOG(1+X) in natural log
204 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!