...
Code Block | ||
---|---|---|
| ||
function boolean = isPalindromeSentence(sentence) word = ''; counter = 1; for i = 1:length(sentence) if strcmp(sentence(i), ' ') || strcmp~isletter(sentence(i), '.') || strcmp(sentence(i), ',') continue end word(counter) = sentence(i); counter = counter + 1; end boolean = isPalindrome(word); end |
...