Code covered by the BSD License  

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
196 Algorithm + GUI Beta Version

Be the first to rate this file! 1 Download (last 30 days) File Size: 9.04 KB File ID: #22833 Version: 1.0
image thumbnail

196 Algorithm + GUI Beta Version


Darin Koblick (view profile)


Highly optimized c code and Matlab GUI to find any palindrome using the 196-algorithm

| Watch this File

File Information

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.

                    196 <--------- Starting Number Sequence
                    +691 <--------- Reversed Number Sequence

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.

                    + 788
                    + 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.

MATLAB release MATLAB 7.7 (R2008b)
Other requirements C compiler Matlab R2008b
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us