Skip to content

Instantly share code, notes, and snippets.

@yongsun
yongsun / lr_circles.m
Created June 14, 2012 05:29
count the circles of numbers
X = [
1,0,3,0,0,0,0,0,1,0,0; % 7111
1,1,0,0,0,0,0,0,0,2,1; % 8809
1,0,1,2,0,0,0,0,1,0,0; % 2172
1,0,0,0,0,0,0,4,0,0,0; % 6666
1,0,4,0,0,0,0,0,0,0,0; % 1111
1,0,0,4,0,0,0,0,0,0,0; % 2222
1,0,0,1,0,0,0,2,1,0,0; % 7662
1,0,1,0,2,0,0,0,0,0,1; % 9313
1,4,0,0,0,0,0,0,0,0,0; % 0000