Hi all, I just can't find out why the assertion fails. All works well on my MALTAB but not here. Both codes (commented and not) remove only the words which end with 'ain' and leave the two spaces but still the assertions here has failed.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
s1 = 'The rain in Spain falls mainly on the plain';
s2 = 'The in falls mainly on the ';
assert(strcmp(remAin(s1),s2));
|
2 | Fail |
s1 = 'The pain from my migraine makes me complain';
s2 = 'The from my migraine makes me ';
assert(strcmp(remAin(s1),s2));
|
3 | Fail |
s1 = 'I had to explain that "ain" is not a word';
s2 = 'I had to that "" is not a word';
assert(strcmp(remAin(s1),s2));
|
Find common elements in matrix rows
1232 Solvers
Back to basics 13 - Input variables
233 Solvers
Back to basics 19 - character types
225 Solvers
325 Solvers
274 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!