MATLAB Answers

How do I access the source code for built-in functions in MATLAB?

433 views (last 30 days)
Is the source code for built-in functions such as EIG, FFT, RAND, SORT, or backslash (\) available?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 4 Oct 2017
A built-in function is part of the MATLAB executable. MATLAB does not implement these functions in the MATLAB language. Although most built-in functions have a .m file associated with them, this file only supplies documentation for the function. The source code detailing the implementation of built-in functions is confidential and proprietary information of MathWorks, Inc. We cannot send the source code to customers. However, some details about the algorithms used for many of these functions, including EIG and FFT, are available in the help documentation. Please type:
doc eig
doc fft
from the MATLAB command prompt.
If you are interested in the RAND or RANDN functions, you can read more information about them in two Cleve's Corner articles available at the following locations:
If you are interested in the backslash operator for solving linear systems of equations, see the following solutions:


Sign in to comment.

More Answers (0)