stop_rule.m 158 B

123456789
  1. function retVal=stop_rule(X,gradX)
  2. % Stopping Criterions
  3. % Written by Naiyang (ny.guan@gmail.com)
  4. pGrad=gradX(gradX<0|X>0);
  5. retVal=norm(pGrad);
  6. end