The version of matlab is not going to affect the result. This solution removes punctuation from the input, so the '.' at the end of sentence in the second test is incorrectly removed.
It would be better if the test suite did not rely on a particular ordering of the rows. You could use isempty(setxor(myfullfact(...), y_correct, 'rows')) instead of isequal(...)