How to find those function end with *fun
Mostrar comentarios más antiguos
As we know,there are structfun,arrayfun,cellfun and so on.Could we find those function with code method in matlab?
As I try,the help *fun doesn't work.
1 comentario
Steven Lord
el 17 de Jul. de 2017
I'm curious. Why do you want to generate such a list?
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 16 de Jul. de 2017
Editada: Walter Roberson
el 16 de Jul. de 2017
2 votos
Including package methods and including examples, but excluding built-ins, and excluding methods of object classes that are built into the constructor .m files, the available functions as of R2017a are
Afun aggregatebykeyfun aggregatefun ambgfun arrayfun
basisfun bowlpeakfun bswfun bsxfun
cellfun cgfun chunkfun clientfun code_chart_header_file_sfun code_chart_source_file_sfun code_machine_header_file_sfun code_machine_source_file_sfun confun cwtftboxfun
datamatrixfun datasetfun ddefun dmarrayfun dmbsxfun
elementfun expensive_confun expensive_objfun
filtfun fitfun fitoutputfun fixedchunkfun
gaminlpplotbestfun gaoutfun gaplotbestfun goalfun
hAggregatefun hSlicefun hetfun
idnlfun
kernelfun
mathfun mech_setup_sfun mfun myfffun myfun mysvmfun myufun
objfun outputfun
pCellfunAndArrayfun pagefun pambgfun paralleldemo_gpu_arrayfun paralleldemo_gpu_pagefun parse_ml_fun partitionfun pslinkfun
reducebykeyfun reducefun rowfun rtwdemo_comments_mptfun
shufflefixedchunkfun sldemo_tanksfun slicefun spfun ssGenSfun statrobustwfun stencilfun stepfun structfun symfun
ternaryfun terrainfun
ut0fun
varfun
wavefun wdumfun wfusfun whelpfun wpfun
4 comentarios
Yode
el 16 de Jul. de 2017
Walter Roberson
el 16 de Jul. de 2017
I used standard Unix tools.
!find /Applications/MATLAB_R2017a.app -type f -name \*.[mp] -print | awk -F/ '{print $NF}' | sort -u
Yode
el 16 de Jul. de 2017
Walter Roberson
el 16 de Jul. de 2017
pathdirs = regexp(path, pathsep, 'split');
funs = {};
for diridx = 1 : length(pathdirs)
thisdir = pathdirs{diridx};
file_info = [dir( fullfile(thisdir, '*.m') );
dir( fullfile(thisdir, '*.p') )];
for fileidx = 1 : length(file_info)
thisfile = file_info(fileidx).name;
[~, basefile, ~] = fileparts(thisfile);
if length(basefile) >= 3 && strcmp(basefile(end-2:end), 'fun')
funs{end+1} = basefile;
end
end
end
funs = unique(funs);
fprintf('%s\n', funs{:});
Categorías
Más información sobre 循环及条件语句 en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!