Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
s1 = 'kitten';
s2 = 'sitting';
d_correct = 3;
assert(isequal(levenshtein(s1,s2),d_correct))
d =
3
|
2 | Pass |
s1 = 'Saturday';
s2 = 'Sunday';
d_correct = 3;
assert(isequal(levenshtein(s1,s2),d_correct))
d =
3
|
3 | Pass |
s1 = 'MATLAB rocks!';
s2 = 'MathWorks';
d_correct = 9;
assert(isequal(levenshtein(s1,s2),d_correct))
d =
9
|
4 | Pass |
s1 = 'Four score and seven years ago';
s2 = 'Eighty seven years before today';
d_correct = 25;
assert(isequal(levenshtein(s1,s2),d_correct))
d =
25
|
5 | Pass |
s1 = 'Row row row your boat';
s2 = 'Gently down the stream';
d_correct = 18;
assert(isequal(levenshtein(s1,s2),d_correct))
d =
18
|
6 | Pass |
s1 = 'ninety-nine bottles of beer on the wall';
s2 = 'eighty-six bottles of beer on the wall';
d_correct = 6;
assert(isequal(levenshtein(s1,s2),d_correct))
d =
6
|
7 | Pass |
s1 = 'these are the times that try men''s souls';
s2 = 'soulwise, these are trying times';
d_correct = 27;
assert(isequal(levenshtein(s1,s2),d_correct))
d =
27
|
Find relatively common elements in matrix rows
865 Solvers
1261 Solvers
Renaming a field in a structure array
731 Solvers
The Hitchhiker's Guide to MATLAB
2874 Solvers
3065 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!