templates file matlab

good morning people

i am trying to create a new ocr program at matlab that it will take a jpg picture and only recognize zero and one numbers and then print them to a txt file. doing some googling i found out some interesting algorithms. the faster is one that takes the picture and compares it with some templates to decide which letter or number is. the problem is that trying to create my own templates file that it will help me complete the work. below i post the code using all 36 templates. if you have any idea how i could make it work for 2 numbers only please help

Code:
%CREATE TEMPLATES
%Letter
%Number
clear all