is Palindrome Number Algorithm
(sequence A002779 in the OEIS).Buckminster Fuller identify a set of numbers he named Scheherazade numbers, some of which have a palindromic symmetry of digit groups. A palindromic number (also known as a numeral palindrome or a numeral palindrome) is a number that remains the same when its digits are reversed.
% isPalindromeNumber: returns true if the given number are a palindrome
% otherwise false.
% assumes: the given number is positive
function ans = isPalindromeNumber(number)
% precondition
assert(number >= 0,'number must be positive')
ans = false;
strNumber = num2str(number); % convert the given number to character array
if (strNumber == flip(strNumber))
ans = true;
endif
endfunction