function [Xc,Yc]=center(M)

% >> [Xc,Yc]=center(MATRIX) returns as Xc and Yc the row
% and the column of the pixel of highest
% intensity in the matrix MATRIX.
%
% Usefull to find the center of a PSD image!

[m,I]=max(M);
[mm,Yc]=max(m);
Xc=I(Yc);