Code covered by the BSD License  

Highlights from
196 Algorithm + GUI Beta Version

Be the first to rate this file! 17 Downloads (last 30 days) File Size: 10.1 KB File ID: #22833
image thumbnail

196 Algorithm + GUI Beta Version

by

 

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

| Watch this File

File Information
Description

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.

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