function J=meancrit(Criterion,m1,m2)
% MEANCRIT  Mean criterion
%	J=meancrit('Unser',m1,m2)
%	J=meancrit('Singh',m1,m2)

if strcmp(lower(Criterion),'unser')
  J=(m1-m2)^2 / (m1*m2);
elseif strcmp(lower(Criterion),'singh')
  J=m1/m2;
else
  error('Unknown criterion');
end