C Language and MATLAB Interface: Programming and Examples: Programming and Examples

Author: Li Chuanjun
Publisher:
Publish Date: 2004-10-01
Features: This book provides a comprehensive introduction to C-MEX functions with detailed examples. It can serve as a reference for engineers working on MATLAB and MEX mixed editing, as well as for C programmers. Additionally, it can be used as a course textbook for MATLAB training. The book introduces the programming methods of MATLAB interface functions in a concise and systematic manner, with rich practical examples. It explains in detail how to program MATLAB data types in C-MEX functions. These data types primarily include double-precision and non-double-precision numeric arrays, strings, structure arrays, cell arrays, sparse arrays, etc. At the same time, it covers how to call MATLAB functions within C-MEX functions, how to use MATLAB's built-in BLAS and LAPACK library functions to edit C-MEX functions, and how to use external Intel MKL library functions for C-MEX function programming. Examples are provided to demonstrate how to implement the functionality of MATLAB's mathematical functions such as svd, eig, lu, chol, inv, and det using C-MEX functions. The use of these library functions can significantly improve computational speed. Additionally, the appendix of the book introduces examples of erroneous syntax in C-MEX functions, as well as MEX library functions and MX library functions.

📌 Related Posts