Chapter
H
aving appreciated the power of C/C++ and the convenience of MATLAB,
this chapter will teach us how to take advantage of these programming
languages. Based on the fact that MATLAB was developed using C, and
C++, interfacing between the languages is quite feasible.
This chapter will teach us how to call C routines from MATLAB and use
MATLAB’s existing libraries from the C program through the following:
Introduction to MEX-files
Components of MEX-files
MATLAB Supported C Compilers
Handling Scalars
One Scalar Input and One Scalar Output
Two Scalar Inputs and One Scalar Output
Handling Vectors
One Vector Input and One Scalar Output
Handling Matrices
Multiple Matrix Inputs and One Vector Output
Previous Evaporation Problems Revisited
Single-Effect Evaporator ...