Bereket - the error message is telling you that the matrices upon which you are executing the difference (of), are of different dimensions. When subtracting one matrix from an another, both must have the same number of rows and columns. In the case of your code
what are the dimensions of z(i,:) compared with the dimensions of m? Or are you expecting m to be a scalar?
Also, you have a line of code
Eigenfaces = ta*L_eig_vec;
where Eignefaces is the name of your function. Is this intentional? Or should this just be local variable named differently from the function?