function norP=normalizationP(P,op)

dim=size(P,1);

if(strcmp(op,'row')==1)
    norP=abs(P)./(max(abs(P),[],2)*ones(1,dim));
elseif(strcmp(op,'col')==1)
    norP=abs(P)./(ones(dim,1)*max(abs(P)));
else
    error('Specify op correctly.');
end
