How many built-in functions have Matlab?
Show older comments
How many built-in functions have Matlab R2019b, including all the toolboxes?
9 Comments
Walter Roberson
on 16 Jan 2020
"Many".
It is difficult to get a list of all the built-in functions; they are not all documented, and they just live inside compiled libraries without there being any individual configuration file for them.
Not many people have all of the toolboxes even if we had a tool to scan the compiled libraries to find the names.
Guillaume
on 16 Jan 2020
Yes, the only people who stand a chance to answer this question are Mathworks employees and I doubt that it's something they'd be willing to share. Plus, it probably change in each version.
In addition, what people call built-in functions may differ from what matlab calls built-in. For example the plotting function bar is not built-in according to matlab (but plot is).
Steven Lord
on 16 Jan 2020
Walter is correct, not all built-in functions (my definition above) are documented. Some of those are known to users (feature is one example) while many are not (I'm not going to give any examples.)
Guillaume is correct as well that the answer depends on what you consider a "built-in" function and that each release introduces at least one new built-in function.
Users often call script, function, or class files in a MathWorks product implemented using the MATLAB language in files with the .m or .mlx extension as "built-in functions". I would instead call those "program files included with <fill in the name of the MathWorks product that contains them>". To me, "built-in functions" includes at least in part "a function that call be called using the builtin function and for which MathWorks doesn't provide the source code."
Using Guillaume's example, I consider bar to be a program file included with MATLAB, while plot is a built-in function in MATLAB. [There are also overloads of plot for various types of objects implemented as program files included with various products, just to confuse matters a little more.] This isn't completely a semantic issue: you can call plot using the builtin function (if you want to ensure that you call the built-in function rather than an overloaded plot method, for example) but you can't call bar this way.
I'm kind of curious why you are interested. Is it just curiosity or is there something you were hoping to be able to do where this information would be useful or necessary?
Walter Roberson
on 16 Jan 2020
There even some functions that can only be called using builtin() because they have names that do not match the rules for MATLAB functions.
Walter Roberson
on 17 Jan 2020
Note with regard to Not Documented:
Some of the functions have available help information if you just happen to know their name, even though they are not listed anywhere as an available function.
But other functions have no help information at all. They just exist and do mysterious things.
stozaki
on 17 Jan 2020
Function reference is published as official document.
Functions are listed in alphabetical order. There are about 18000 pages.
Gabriel Ruiz-Martinez
on 17 Jan 2020
Edited: Gabriel Ruiz-Martinez
on 17 Jan 2020
Walter Roberson
on 17 Jan 2020
In the context of MATLAB, the term "built-in function" refers to functionality that is compiled in to an internal library, as opposed to implemented as .m code (which users could read) or .mlx* code (binary library implementations.)
The number of functions that a user could call is probably not a good measure, as many many functions are not intended for users to call directly.
The number of functions intended for the user to call is potentially of interest, but also gets questionable. Should every method provided for every class be counted? If 17 different functions with the general aim of producing Hankle reductions of a dynamic model are provided, is it "interesting" to count all 17?
You kind of what to know how many "different" things that a language and associated libraries can do, and that is difficult to define.
Guillaume
on 19 Jan 2020
Also, The number of functions wouldn't be a good metric since some functions are significantly more complex than others. The built-in plus for double is going to be fairly simple, the cpu already knows how to perform addition. On the other hand, some specialised toolbox functions are going to be very complex (e.g. neural network, image processing, etc.) You can't really give them the same weight.
Answers (0)
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!