Giuseppe, you could use
function ispal = palindrome(forward_string)
for ii=1:numel(forward_string)
ispal{ii} = strcmp(forward_string{ii},fliplr(forward_string{ii}));
end
Alternatively, you could return ispal as a numeric array: ispal(ii).
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!