Using the C Math Library | ![]() |
Introduction
The MATLAB ® C Math Library makes the mathematical core of MATLAB available to application programmers. The library is a collection of more than 400 mathematical routines written in C. Programs written in any language capable of calling C functions can call these routines to perform mathematical computations.
The MATLAB C Math Library is based on the MATLAB language. The mathematical routines in the MATLAB C Math Library are C callable versions of features of the MATLAB language. However, you do not need to know MATLAB or own a copy of MATLAB to use the MATLAB C Math Library. If you have purchased the MATLAB C Math Library, then the only additional software you need is an ANSI C compiler. In addition, you may freely distribute applications you develop with the MATLAB C Math Library.
Who Should Read This Book
This book assumes that you are familiar with general programming concepts such as function calls, variable declarations, and flow of control statements. You also need to be familiar with the general concepts of C and linear algebra. The audience for this book is C programmers who need a matrix math library or MATLAB programmers who want the performance of C. This book will not teach you how to program in either MATLAB or C.
MATLAB C Math Library Features
Version 2.1 of the library provides the following new features:
eval
function for expressions that do not contain variablesinput
function with the same restrictions as eval
Unsupported MATLAB Features
The library does not include any Handle Graphics ® or Simulink® functions. For information about compiling an application that uses graphics functions, see the MATLAB C/C++ Graphics Library User's Guide.
In addition, the library does not support MATLAB objects
Library Routine Naming Convention
All routines in the MATLAB C Math Library begin with the prefix mlf
.
The name of every routine in the MATLAB C Math Library is derived from the corresponding MATLAB function. For example, the MATLAB function sin
is represented by the MATLAB C Math Library function mlfSin
. The first letter following the mlf
prefix is always capitalized.
MATLAB C Math Library Documentation | ![]() |