In solve.QP(), you don't need to expand the equality into two inequalities. It can DIRECTLY handle the equality constraints. The first `meq' rows of the constraint matrix are equality constraints. Here is the excerpt from the documentation.
meq the first meq constraints are treated as equality constraints, all further as inequality constraints (defaults to 0). Therefore, solve.QP() can provide the full functionality of lsqlin in Matlab. However, one caveat is that the bounds constraints have to be implemented via inequalities in solve.QP(), which is a slight pain, but not a deal breaker. Best, Ravi [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.