List of built-in functions?

조회 수: 65 (최근 30일)
Fredrik P
Fredrik P 2020년 4월 5일
댓글: Walter Roberson 2020년 6월 21일
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
Fredrik P
Fredrik P 2020년 6월 20일
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 2020년 6월 20일
At Undocumented Matlab you will find interesting articles on performance.

댓글을 달려면 로그인하십시오.

채택된 답변

per isakson
per isakson 2020년 6월 21일
편집: per isakson 2020년 6월 21일
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
Walter Roberson
Walter Roberson 2020년 6월 21일
There are also additional built-in functions that do not have documenting .m files

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Joost
Joost 2020년 6월 20일
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.

카테고리

Help CenterFile Exchange에서 Just for fun에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by