File Exchange

image thumbnail

196 Algorithm + GUI Beta Version

version 1.0 (9.04 KB) by

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

1 Download


View License

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.

Comments and Ratings (0)

MATLAB Release
MATLAB 7.7 (R2008b)

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

» Watch video

Win prizes and improve your MATLAB skills

Play today