23.07.2012 Views

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

MATLAB C++ Math Library Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

0sort<br />

Purpose Sort elements in ascending order<br />

<strong>C++</strong> Prototype mwArray sort(const mwArray &A);<br />

mwArray sort(mwArray *INDEX, const mwArray &A);<br />

mwArray sort(const mwArray &A, const mwArray &dim);<br />

mwArray sort(mwArray *INDEX, const mwArray &A, const mwArray &dim);<br />

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

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

Syntax<br />

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

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

mwArray B; // Return value<br />

B = sort(A);<br />

B = sort(&INDEX,A);<br />

B = sort(A,dim);<br />

B = sort(&INDEX,A,dim);<br />

B = sort(A)<br />

[B,INDEX] = sort(A)<br />

B = sort(A,dim)<br />

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

sort<br />

344

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

Saved successfully!

Ooh no, something went wrong!