Skip to content

Commit

Permalink
Change nlhs value.
Browse files Browse the repository at this point in the history
  • Loading branch information
detu committed Aug 20, 2021
1 parent cd5efe8 commit a954d61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ALM/qpAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
try {
if (nrhs < 1)
throw std::invalid_argument("required one input arg");
if (nlhs != 1)
if (nlhs < 1)
throw std::invalid_argument("required one output arg");

// Eigen::SparseMatrix<double> H = matlab_to_eigen_sparse(prhs[0]);
Expand Down Expand Up @@ -213,8 +213,8 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
}
plhs[0] = eigen_to_matlab_sparse(std::move(x0));
plhs[1] = eigen_to_matlab_sparse(std::move(lambda));
plhs[2] = mxCreateDoubleScalar(std::move(objVal));
plhs[3] = mxCreateDoubleScalar(std::move(status));
plhs[2] = mxCreateDoubleScalar(objVal);
plhs[3] = mxCreateDoubleScalar(status);
}
catch (std::exception& ex){
mexErrMsgIdAndTxt("tmp::error", ex.what());
Expand Down

0 comments on commit a954d61

Please sign in to comment.