Using the C++ Math Library | ![]() ![]() |
Returning One Result and Passing Only Required Input Arguments
For many functions in the MATLAB C++ Math Library, the translation from interpreted MATLAB to C++ is simple. For example, in interpreted MATLAB, you invoke the cosine function, cos()
, like this
Y = cos(X)
where both X and Y are arrays.
Using the MATLAB C++ Math Library, you invoke cosine in exactly the same way
Y = cos(X);
where both X
and Y
are mwArray
objects.
![]() | How to Call C++ Library Functions | Passing Optional Input Arguments | ![]() |