Code covered by the BSD License  

Highlights from
196 Algorithm + GUI Beta Version

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

196 Algorithm + GUI Beta Version

by Darin Koblick

 

30 Jan 2009

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  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
optimization Darin Koblick 30 Jan 2009 16:10:37
palindrome Darin Koblick 30 Jan 2009 16:10:37
palindromic Darin Koblick 30 Jan 2009 16:10:37
math Darin Koblick 30 Jan 2009 16:10:37
mathematics Darin Koblick 30 Jan 2009 16:10:37
196 Darin Koblick 30 Jan 2009 16:10:37
algorithm Darin Koblick 30 Jan 2009 16:10:37
number theory Darin Koblick 30 Jan 2009 16:10:37
sequences Darin Koblick 30 Jan 2009 16:10:37
recreational mathematics Darin Koblick 30 Jan 2009 16:10:37
mathematical records Darin Koblick 30 Jan 2009 16:10:37

Contact us at files@mathworks.com