This is a GUI that I had developed to find the palindrome of any number. The underlying algorithm will take any positive 2+ digit number, reverse the sequence, and add the reversed sequence onto the original number.
Example:
196 <--------- Starting Number Sequence
+691 <--------- Reversed Number Sequence
---------
887
The algorithm will then check to see if the result is palindromic. Since 887 does not equal it's reversed counterpart, 788, this is not palindromic yet.
The resulting number,887 is now reversed yet again following the processes until a palindrome is reached.
887
+ 788
--------
1675
+ 5761
----------
7436 and so on ...
The user will have to compile the palinsum.c function using the Matlab MEX compiler. Typing in 'mex palinsum.c' should accomplish this o a 32-bit Matlab environment with minimal effort.
Cool Features:
- Specify the number of digits you would like to stop processing.
- Specify the .mat file name to output the processed number to quit the program and save the most recent resulting number sequence.
- Load in the .mat file containing the processed number to pick up where you left off. |