function[best,sname,sbest,sbestname] =  bestMatch(shape)
files = dir ('*.shp');
best = realmax;
sbest = realmax;
sname ='';
sbestname ='';
for i=1:size(files,1)
    fname = files(i).name;
    [pathstr,name,ext,versn] =  fileparts(fname);
    fp = fopen(fname,'r+');
    
    target = fread(fp,'int32');
    fclose(fp);
    diff = shape-target;
    diff = diff.^2;
    score = sqrt(sum(diff));
    
    if(score<best)
         sbest = best;
        sbestname = sname;
        best = score;
        sname = name;
    elseif(score<sbest)
         sbest = score;
        sbestname = name;
    end
end
    