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.

tobool<br />

0tobool<br />

Purpose Convert an array to a Boolean value by reducing the rank of the array to a<br />

scalar<br />

<strong>C++</strong> Prototype bool tobool(const mwArray &t);<br />

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

391<br />

if (tobool(A != 0))<br />

{<br />

// test succeeded, do something<br />

}

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

Saved successfully!

Ooh no, something went wrong!