The Luhn algorithm is a fast checksum that allows you to know if an entered series of numbers has any of the repeated digits or transpositions that are common when typing numbers in. By having a simple checksum, you can validate a number before doing a more costly database check. This video explains how to implement the algorithm. A future video will discuss a simple testing mechanism to show what failure modes go undetected by this checksum.
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.