display_help.m
来自「基于Matlab的地震数据处理显示和测井数据显示于处理的小程序」· M 代码 · 共 54 行
M
54 行
function display_help(funct,field)% Displays instructions found in a text file with name ['help4',funct,'.txt'] % in subdirectory "HelpFiles" in directory S4M.myseislab%% Written by: E. R.: December 20, 2005% Last updated:%% display_help(funct,field)% INPUT% funct string with name of function that creates the plot for which the % button is intended% field field of the help structure which contains the help message% (not used if the help structure read from the text file has only one field)global S4M% Check if a help file existsfilename=fullfile(S4M.myseislab,'HelpFiles',['help4',funct,'.txt']);fid=fopen(filename);if fid < 0 alert(['Help file for "',funct,'" has not been found. No help message will be shown.']) returnend% Read help file and save its content in structure "help_info".help_info=get_help_file(fid);% Determine the number of sub-menus (if any)fields=fieldnames(help_info);if length(fields) == 1 % Only one message temp=getfield(help_info,fields{1}); helpdlg(temp,S4M.name)else if nargin < 2 error('No message field specified.') end try temp=getfield(help_info,field); catch disp(help_info) if ischar(field) error(['Requested field of "help_info" ("',field,'") not found.']) else error('Second input argument is not a character string.') end end helpdlg(temp,S4M.name)end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?