Introduction - If you have any usage issues, please Google them yourself
COMPDIR Computes a search direction in a subspace defined by Z. Helper function for NLCONST. Returns Newton direction if possible. Returns random direction if gradient is small. Otherwise, returns steepest descent direction. If the steepest descent direction is small it computes a negative curvature direction based on the most negative eigenvalue. For singular matrices, returns steepest descent even if small.