Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
A = {'MATLAB','HURRAY','SPARKLY','KITTENS','FUN'};
B = 'KITTENS';
C = {'MATLAB','HURRAY','SPARKLY','FUN','KITTENS'};
assert(isequal(puzzler(A,B),C))
ans =
0 0 0 1 0
ans =
'MATLAB' 'HURRAY' 'SPARKLY' 'FUN' 'KITTENS'
|
2 | Pass |
%%
A = {'HELP!','I''VE','FALLEN','ON THE','CAPS LOCK','KEY'};
B = 'stop shouting';
C = {'HELP!','I''VE','FALLEN','ON THE','CAPS LOCK','KEY'};
assert(isequal(puzzler(A,B),C))
ans =
0 0 0 0 0 0
ans =
'HELP!' 'I'VE' 'FALLEN' 'ON THE' 'CAPS LOCK' 'KEY'
|
3 | Pass |
%%
A = {'When','in the','human events','course','of'};
B = 'human events';
C = {'When','in the','course','of','human events'};
assert(isequal(puzzler(A,B),C))
ans =
0 0 1 0 0
ans =
'When' 'in the' 'course' 'of' 'human events'
|
4 | Pass |
%%
A = {'Soulwise','these','times','are','trying'};
B = 'times';
C = {'Soulwise','these','are','trying','times'};
assert(isequal(puzzler(A,B),C))
ans =
0 0 1 0 0
ans =
'Soulwise' 'these' 'are' 'trying' 'times'
|
54371 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
278 Solvers
233 Solvers
376 Solvers
Switch matrix to a column vector
260 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!