23.07.2012 Views

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

0nnls<br />

Purpose Nonnegative least squares<br />

Note The nnls routine was replaced by lsqnonneg in Release 11 (<strong>MATLAB</strong><br />

5.3). In Release 12 (<strong>MATLAB</strong> 6.0), nnls displays a warning and calls<br />

lsqnonneg.<br />

<strong>C++</strong> Prototype mwArray nnls(const mwArray &A, const mwArray &b);<br />

mwArray nnls(const mwArray &A, const mwArray &b,<br />

const mwArray &tol);<br />

mwArray nnls(mwArray *w, const mwArray &A, const mwArray &b);<br />

mwArray nnls(mwArray *w, const mwArray &A, const mwArray &b,<br />

const mwArray &tol);<br />

<strong>C++</strong> Syntax #include "matlab.hpp"<br />

<strong>MATLAB</strong><br />

Syntax<br />

mwArray A, b, tol; // Input argument(s)<br />

mwArray w; // Output argument(s)<br />

mwArray x; // Return value<br />

x = nnls(A,b);<br />

x = nnls(A,b,tol);<br />

x = nnls(&w,A,b);<br />

x = nnls(&w,A,b,tol);<br />

x = nnls(A,b)<br />

x = nnls(A,b,tol)<br />

[x,w] = nnls(A,b)<br />

[x,w] = nnls(A,b,tol)<br />

See Also <strong>MATLAB</strong> nnls Calling Conventions<br />

nnls<br />

263

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!