📄 run_help_examples.m
字号:
function warnings=run_help_examples(folder)% Run the examples in the help sections of all functions in a directory%% Written by: E. R.: January 27, 2008% Last updated:%% warnings=run_help_examples(folder)% INPUT% folder directory with functions (optional)% OUTPUT% warnings cell vector with all the warnings issued%% EXAMPLE% run_help_examples('D:\MyMatlab\CORE\Geophysics_3.0')run_presets_if_neededglobal S4MS4M.batch=true; %% Skip files that request user inputfiles2skip={ ...'l_plot1.m';'open_file.m';'read_las_file.m';'read_las2_file.m';'read_segy_file.m';'run_help_examples.m';'s_iplot.m';'s_ispectrum.m';'s_pick_horizon_2d.m';'s_volume_browser.m';'s_wavelet4landmark.m';'s_wavelet_comparison.m';'s_wavelet_from_spectrum.m';'t_plot_3d.m';'write_las_file.m';'write_pwells2pavo.m';'write_segy_file.m'};%% Get folderif nargin == 0 || isempty(folder) folder=uigetdir(S4M.myseislab,'Folder for m-files');endwarnings=cell(100,1);files=what(folder);ik=0;% Get filesallfiles=files.m;% Remove all files that are in "files2skip"temp=union(files2skip,allfiles);files2test=setxor(files2skip,temp);%% Run examples of selected filesfor ii=1:length(files2test) warn=helpx(files2test{ii}); if ~isempty(warn) ik=ik+1; warnings{ik}=warn; end close all % Close all figures systemDefaults S4M.batch=true; endwarnings(ik+1:end)=[];show(warnings)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -