>> fact_test 28-Sep-2013 16:29:34 FACT_TEST MATLAB version Demonstrate a simple use of the MEX compiler, which allows MATLAB to call C++ functions. Get a directory listing. The file FACT.CPP should be there. cheby_u.c cheby_u_test_output.txt fact_test.m matlab_calls_c.html cheby_u_test.m fact.cpp fact_test_output.txt Compile the file FACT.CPP. Warning: You are using gcc version "4.4.7". The version currently supported with MEX is "4.3.4". For a list of currently supported compilers see: http://www.mathworks.com/support/compilers/current_release/ Get a directory listing. A new file should show up, containing the compiled information. cheby_u.c cheby_u_test_output.txt fact.mexa64 fact_test_output.txt cheby_u_test.m fact.cpp fact_test.m matlab_calls_c.html Now use FACT as though it were a MATLAB M-file function. N (N Factorial) 1 1 2 2 3 6 4 24 5 120 6 720 7 5040 8 40320 9 362880 10 3628800 FACT_TEST: Normal end of execution. 28-Sep-2013 16:29:35 >>