Is there somewhere a list of Matlab’s built-in functions like histc that are not written in Matlab own scripting language? That is, functions whose code that can’t be revealed by open functionName.

5 comentarios

Tommy
Tommy el 5 de Abr. de 2020
This doesn't directly answer your question, but the function which does tell you whether a function is built-in:
>> which histc
built-in (C:\Program Files\MATLAB\R2019a\toolbox\matlab\datafun\histc)
dpb
dpb el 5 de Abr. de 2020
The list can vary by release...guess one could build a function to parse a listing
Asvin Kumar
Asvin Kumar el 8 de Abr. de 2020
Can you provide more details as to what your use case is?
Fredrik P
Fredrik P el 20 de Jun. de 2020
Asvin: Sorry for my superslow reply. I found histc by asking on Stack Exchange and could make my code run much faster. I guess that I was looking for a list of similarly fast functions that I could browse to see if I could find any obvious candidates to up the speed further. (I realize that this is probably best done by profiling and zooming in bottlenecks, but I still feel that a list could be useful.)
per isakson
per isakson el 20 de Jun. de 2020
At Undocumented Matlab you will find interesting articles on performance.

Iniciar sesión para comentar.

 Respuesta aceptada

per isakson
per isakson el 21 de Jun. de 2020
Editada: per isakson el 21 de Jun. de 2020

0 votos

On R2018b, Win10 and a SSD, this code
%%
tic
sad = dir( fullfile( matlabroot, 'toolbox', 'matlab', '**', '*.m' ) );
%%
for d = reshape( sad, 1,[] )
if d.bytes <= 4096
ffs = fullfile( d.folder, d.name );
chr = fileread( ffs );
if contains( chr, 'Built-in function', 'IgnoreCase',true )
fprintf( '%s\n', d.name );
end
end
end
toc
produced a list with 496 names. The elapse time of the second run was less than two and a half seconds.

1 comentario

Walter Roberson
Walter Roberson el 21 de Jun. de 2020
There are also additional built-in functions that do not have documenting .m files

Iniciar sesión para comentar.

Más respuestas (1)

Joost
Joost el 20 de Jun. de 2020

0 votos

There is an interesting book on speeding up Matlab functions and scripts. A few years old already, but a good read. Author Yair Altman, also active on Matlab Answers and mastermind behind the Undocumented Matlab page mentioned in one of the comments.

Categorías

Más información sobre Live Scripts and Functions en Centro de ayuda y File Exchange.

Productos

Versión

R2019a

Etiquetas

Preguntada:

el 5 de Abr. de 2020

Comentada:

el 21 de Jun. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by