WAFOMENU displays a user interface to the documentation files of WAFO CALL: wafomenu(kind) kind = 0, displays a point and click menu (default) 1, displays a text driven menu
Create a list of choices with uicontrols and callbacks. | |
Root directory of WAFO installation. | |
Clear command window. | |
Build full filename from parts. | |
Display help text in Command Window. | |
Prompt for user input. | |
Control paged output in command window. | |
Convert number to string. (Fast version) | |
Wait for user response. | |
Form blank padded character matrix from strings. | |
Compare strings ignoring case. |
001 function wafomenu(kind) 002 % WAFOMENU displays a user interface to the documentation files of WAFO 003 % 004 % CALL: wafomenu(kind) 005 % 006 % kind = 0, displays a point and click menu (default) 007 % 1, displays a text driven menu 008 % 009 010 % See also docs 011 012 %history 013 % revised pab 21.01.2000 014 % - added kind 015 % - changed h1 line and ordering of menu 016 % - added aboutwafo 017 % By pab 17.12.1999 018 019 if nargin<1|isempty(kind) 020 kind=0; 021 end 022 023 header = 'WAFO Documentation files'; 024 labels =str2mat(... 025 ' 1) Installation description of WAFO Toolbox', ... 026 ' 2) About WAFO',... 027 ' 3) What is new',... 028 ' 4) Ideas for getting started with WAFO',... 029 ' 5) How To Add New Features to WAFO',... 030 ' 6) WAFO known limitations',... 031 ' 7) Bug Report Form for WAFO',... 032 ' 8) Spectrum, covariance function and density (pdf) structures',... 033 ' 9) Level v crossing definitions and nomenclature',... 034 '10) Turning points definitions and numenclature',... 035 '11) Wave definitions and nomenclature',... 036 '12) Wave heights and amplitude definitions and nomenclature',... 037 '13) Wave periods (lengths) definitions and nomenclature' ) ; 038 filenames = str2mat(... 039 'install', ... 040 'aboutwafo', ... 041 fullfile(waforoot,'Readme'),... 042 'getstart',.... 043 'addfeatr',.... 044 'limitations',.... 045 'bugreport',.... 046 'datastructures',.... 047 'crossdef',.... 048 'tpdef',.... 049 'wavedef',... 050 'ampdef',.... 051 'perioddef'); 052 053 Noptions=size(filenames,1); 054 if kind==1, % text driven menu 055 r=1; 056 while ~isempty(r) & ~strcmpi(r,'q') 057 clc 058 disp(header) 059 disp(' ') 060 disp(labels) 061 disp(' ') 062 r=input(['Enter your choice 1,2,...,' num2str(Noptions-1),' or ' ... 063 num2str(Noptions) '. ']); 064 if ~isempty(r) 065 clc 066 r=round(r); 067 if ((1<=r) & (r<=Noptions)) 068 more on, 069 help(filenames(r,:)) 070 more off, 071 pause 072 end 073 end % if r 074 end % while 075 076 else % point and click menu 077 callbacks = [ repmat('helpwin ',Noptions,1) filenames]; 078 choices('DOCS',header,labels,callbacks); 079 end % kind 080 081 return 082 083
Comments or corrections to the WAFO group