Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
F = {@min, [5 2 3 9 13 4 1 7 8]};
N = 2;
assert(isequal(nth_output(F,N),7))
f =
@min
args =
[1x9 double]
varargout =
[1] [7]
|
2 | Pass |
%%
F = {@min, [5 2 3 9 13 4 1 7 8]};
N = 1;
assert(isequal(nth_output(F,N),1))
f =
@min
args =
[1x9 double]
varargout =
[1]
|
3 | Pass |
%%
F = {@regexp, 'she sells sea shells by the seashore', 's'};
N = [1 4 6];
[a,b,c] = nth_output(F,N);
assert(isequal(a,[1 5 9 11 15 20 29 32]))
assert(isequal(b,num2cell('ssssssss')))
assert(isequal(c,repmat(struct,1,8)))
f =
@regexp
args =
'she sells sea shells by the seashore' 's'
varargout =
[1x8 double] [1x8 double] {1x8 cell} {1x8 cell} {1x8 cell} [1x8 struct]
|
556 Solvers
172 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
277 Solvers
Compress strings (not springs)
103 Solvers
Magic is simple (for beginners)
2749 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!