Skip to content

Commit 9768d0a

Browse files
committed
Allow MEX interface to be called without outputs
1 parent d47a676 commit 9768d0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mex/gemmi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ class MexFunction : public matlab::mex::Function {
8787
std::shared_ptr<matlab::engine::MATLABEngine> matlabPtr = getEngine();
8888
matlab::data::ArrayFactory factory;
8989

90-
if (outputs.size() < 1 || outputs.size() > 2) {
90+
if (outputs.size() > 2) {
9191
matlabPtr->feval(u"error",
92-
0, std::vector<matlab::data::Array>({ factory.createScalar("This function requires one or two output arguments.") }));
92+
0, std::vector<matlab::data::Array>({ factory.createScalar("This function accepts at most two output arguments.") }));
9393
}
9494

9595
size_t numArgs = inputs.size();

0 commit comments

Comments
 (0)