ABSTRACT

The arrays in both MATLAB and Fortran are columnoriented and one-based, so translation is not necessary as it was in the C mexFunction.

Combine the two routines into a single file called utsolve.f and type:

mex utsolve.f

in the MATLAB command window. Error checking could be added to ensure that the two input arguments are of the correct size and type. The code would look much like the C example in Chapter 9, so it is not included. Test this routine on as large a matrix that your computer can handle.