PAPERMENU displays a user interface to the paper scripts of WAFO CALL: papermenu(kind) kind = 0, displays a point and click menu (default) 1, displays a text driven menu See also wafomenu
Create a list of choices with uicontrols and callbacks. | |
Clear command window. | |
Prompt for user input. | |
Convert number to string. (Fast version) | |
Form blank padded character matrix from strings. | |
Compare strings ignoring case. |
001 function papermenu(kind) 002 % PAPERMENU displays a user interface to the paper scripts of WAFO 003 % 004 % CALL: papermenu(kind) 005 % 006 % kind = 0, displays a point and click menu (default) 007 % 1, displays a text driven menu 008 % 009 % See also wafomenu 010 011 %history 012 % by pab 20.05.2000 013 014 if nargin<1|isempty(kind) 015 kind=0; 016 end 017 018 header = 'WAFO PAPER scripts'; 019 labels =str2mat(... 020 ' 1) RECDEMO: A statistical procedure for reconstruction of 1D signals.', ... 021 ' 2) WAFODEMO: WAFO - a Matlab toolbox for analysis of random waves and loads.') ; 022 filenames = str2mat(... 023 'recdemo', ... 024 'wafodemo'); 025 026 Noptions=size(filenames,1); 027 if kind==1, % text driven menu 028 r=1; 029 while ~isempty(r) & ~strcmpi(r,'q') 030 clc 031 disp(header) 032 disp(' ') 033 disp(labels) 034 disp(' ') 035 r=input(['Enter your choice 1,2,...,' num2str(Noptions-1),' or ' ... 036 num2str(Noptions) '. ']); 037 if ~isempty(r) 038 clc 039 r=round(r); 040 if ((1<=r) & (r<=Noptions)) 041 eval(filenames(r,:)) 042 %pause 043 end 044 end % if r 045 end % while 046 else % point and click menu 047 callbacks = [filenames]; 048 choices('PAPER',header,labels,callbacks); 049 end % kind 050 051 return 052 053
Comments or corrections to the WAFO group