- #1
Moi
- 3
- 0
I am trying to write a function called ispalindrome, with Matlab, It is supposed to check if a word is a palindrom or not.
It will then return a value True (1)or False(0) for each word.
I have tried to run this, but something seems to be wrong...
function isPalindrome (word)
word = input('isPalindrome ', 's');
if word == strcmpi(word);
disp ('1')
else
disp ('0')
end
It will then return a value True (1)or False(0) for each word.
I have tried to run this, but something seems to be wrong...
function isPalindrome (word)
word = input('isPalindrome ', 's');
if word == strcmpi(word);
disp ('1')
else
disp ('0')
end