This is a flow chart that indicates how to troubleshoot MEX-file creation problems. Five problems and their solutions are addressed:

1. Are you using a supported compiler? (UNIX only)

2. Can you compile your program? (MEX-files only)

3. Can MATLAB load your MEX-file?

4. Do you get a segmentation fault or bus error?

5. Do you get the right answer?