UPC is a MATLAB library which can compute the check digit associated with a uniform product code (UPC), or it can report whether a 12-digit UPC is actually valid.
The computer code and data files made available on this web page are distributed under the GNU LGPL license.
UPC is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version and a Python version.
BANK, a MATLAB library which can compute the check digit associated with a US Bank Routing Number check digit, or it can report whether a 9-digit code is actually valid.
ISBN, a MATLAB library which can determine the check digit for an International Standard Book Number or report whether a given ISBN is valid.
LUHN, a MATLAB program which computes the Luhn check digit for a string, and can validate a string.
You can go up one level to the MATLAB source codes.