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 |
inStr = 'ball';
strList = {'ball', 'bell', 'barn'};
assert(isequal(findMatch(inStr, strList), 'ball'));
|
2 | Fail |
inStr = 'auG';
strList = {'May', 'June', 'July', 'August', 'September'};
assert(isequal(findMatch(inStr, strList), 'August'));
|
3 | Fail |
inStr = 'Ju';
strList = {'May', 'June', 'July', 'August', 'September'};
assert(isequal(findMatch(inStr, strList), ''));
|
4 | Fail |
inStr = 'fontn';
strList = {'FontName', 'FontUnits', 'FontSize', 'FontWeight'};
assert(isequal(findMatch(inStr, strList), 'FontName'));
|
5 | Fail |
inStr = 'weight';
strList = {'FontName', 'FontUnits', 'FontSize', 'FontWeight'};
assert(isequal(findMatch(inStr, strList), 'FontWeight'));
|
6 | Fail |
inStr = 'ball';
strList = {'baseball', 'balloon', 'ball'};
assert(isequal(findMatch(inStr, strList), 'ball'));
|
7 | Fail |
inStr = 'bal';
strList = {'baseball', 'balloon', 'ball'};
assert(isequal(findMatch(inStr, strList), ''));
|
19330 Solvers
962 Solvers
190 Solvers
Matrix indexing with two vectors of indices
485 Solvers
188 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!