Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
languagenone
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

...