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'));
FND =
0
|
2 | Pass |
inStr = 'auG';
strList = {'May', 'June', 'July', 'August', 'September'};
assert(isequal(findMatch(inStr, strList), 'August'));
FND =
0
outStr =
'August'
|
3 | Pass |
inStr = 'Ju';
strList = {'May', 'June', 'July', 'August', 'September'};
assert(isequal(findMatch(inStr, strList), ''));
FND =
0
outStr =
'June'
outStr =
0×0 empty char array
|
4 | Pass |
inStr = 'fontn';
strList = {'FontName', 'FontUnits', 'FontSize', 'FontWeight'};
assert(isequal(findMatch(inStr, strList), 'FontName'));
FND =
0
outStr =
'FontName'
|
5 | Pass |
inStr = 'weight';
strList = {'FontName', 'FontUnits', 'FontSize', 'FontWeight'};
assert(isequal(findMatch(inStr, strList), 'FontWeight'));
FND =
0
outStr =
'FontWeight'
|
6 | Pass |
inStr = 'ball';
strList = {'baseball', 'balloon', 'ball'};
assert(isequal(findMatch(inStr, strList), 'ball'));
FND =
0
outStr =
'baseball'
outStr =
0×0 empty char array
|
7 | Pass |
inStr = 'bal';
strList = {'baseball', 'balloon', 'ball'};
assert(isequal(findMatch(inStr, strList), ''));
FND =
0
outStr =
'baseball'
outStr =
0×0 empty char array
outStr =
0×0 empty char array
|
3075 Solvers
351 Solvers
62 Solvers
184 Solvers
5113 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!