A while ago, a colleague asked me if it was possible to display in a color other than the default, in the Command Window, the values violating some thresholds in an optimization problem. My response was, "That must be doable, because MATLAB does that for, say, error messages. I will look into it." Well, you looked into it alright, Yair!
You "don't understand the utility of this function"? First of all, this submission is not a function, it's a toolbox. I suggest you read John's reply to get a glimpse of its utility, but even before that I suggest, as he did, that you learn some mathematics. That might help you to understand the utility of this toolbox, his other submission MIN2, MAX2, whose utility, too, you have had trouble understanding, and many other of his submissions for that matter - before you go around commenting on their utility. And after that, I suggest you go through the code. I'm sure you can learn one or two things about MATLAB.
PS. As always, great submission John. Thanks for sharing this with the community.