function X=samples2mat
%convert image samples to matrix
%every image forms a row vector row after row
%in X,every row represents an image
X=[];
for i=1:40
    for j=11:15
        a=imread(strcat('E:\ORL\s','num2str(i)','\','num2str(j)''.pgm'));
        m=size(a,1);
        b=[];
        for k=1:m
            b=[b,a(k,:)];
        end
        X=[X;b];
    end
end