wpdtool.m
上传用户:haiyisale
上传日期:2013-01-09
资源大小:3246k
文件大小:21k
源码类别:

波变换

开发平台:

Matlab

  1. function varargout = wpdtool(option,varargin)
  2. %WPDTOOL Wavelet packets display tool.
  3. %   VARARGOUT = WPDTOOL(OPTION,VARARGIN)
  4. %   M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi 12-Mar-96.
  5. %   Last Revision: 16-Jan-2001.
  6. %   Copyright 1995-2002 The MathWorks, Inc.
  7. %   $Revision: 1.20 $ $Date: 2002/06/17 12:18:56 $
  8.         
  9. % Test inputs.
  10. %-------------
  11. if nargin==0 , option = 'create'; end
  12. [option,winAttrb] = utguidiv('ini',option,varargin{:});
  13. % MemBloc1 of stored values.
  14. %---------------------------
  15. n_miscella     = 'WpDisp_Misc';
  16. ind_graph_area = 1;
  17. ind_wave_fam   = 2;
  18. ind_wave_nam   = 3;
  19. ind_maxnum     = 4;
  20. ind_refinment  = 5;
  21. nb1_stored     = 5;
  22. % Tag property of objects.
  23. %-------------------------
  24. tag_prec_val  = 'Prec_Val';
  25. tag_cmd_frame = 'Cmd_Frame';
  26. tag_pop_mod   = 'Pop_Mod';
  27. tag_display   = 'Display';
  28. tag_pus_inf1  = 'Pus_Inf1';
  29. tag_pus_inf2  = 'Pus_Inf2';
  30. switch option
  31.     case 'create'
  32.         % Get Globals.
  33.         %-------------
  34.         [Def_Txt_Height,Def_Btn_Height,Def_Btn_Width,  ...
  35.          Pop_Min_Width,X_Spacing,Y_Spacing,Def_FraBkColor] = ...
  36.             mextglob('get',...
  37.                 'Def_Txt_Height','Def_Btn_Height','Def_Btn_Width', ...
  38.                 'Pop_Min_Width','X_Spacing','Y_Spacing','Def_FraBkColor' ...
  39.                 );
  40.         % Window initialization.
  41.         %----------------------
  42.         win_title = 'Wavelets Packets W System Functions Display';
  43.         [win_loctool,pos_win,win_units,str_numwin,...
  44.                 frame0,pos_frame0,Pos_Graphic_Area,pus_close] = ...
  45.                     wfigmngr('create',win_title,winAttrb,'ExtFig_WDisp',mfilename);  
  46.         varargout{1} = win_loctool;
  47. % Add Help for Tool.
  48. %------------------
  49. wfighelp('addHelpTool',win_loctool,'Wavelet Packet Dis&play','WPDI_GUI');
  50. % Add Help Item.
  51. %----------------
  52. wfighelp('addHelpItem',win_loctool,'Building Wavelet Packets','WPDI_BUILDING');
  53. wfighelp('addHelpItem',win_loctool,'Wavelet Packets Atoms','WPDI_ATOMS');
  54.         % Begin waiting.
  55.         %---------------
  56.         set(wfindobj('figure'),'Pointer','watch');
  57.         % General graphical parameters initialization.
  58.         %--------------------------------------------
  59.         dx = X_Spacing;   dx2 = 2*dx;
  60.         dy = Y_Spacing;   dy2 = 2*dy;
  61.         d_txt = (Def_Btn_Height-Def_Txt_Height);
  62.         push_width = (pos_frame0(3)-4*dx)/2;
  63.         % Position property of objects.
  64.         %------------------------------
  65.         xlocINI      = pos_frame0([1 3]);
  66.         ybottomINI   = pos_win(4)-1.5*Def_Btn_Height-dy2;
  67.         y_low        = ybottomINI-2*Def_Btn_Height;
  68.         x_left       = pos_frame0(1)+dx2;
  69.         pos_prec_txt = [x_left, y_low+d_txt/2, Def_Btn_Width, Def_Txt_Height];
  70.         x_left       = x_left+Def_Btn_Width+dx;
  71.         pos_prec_val = [x_left , y_low , Def_Btn_Width , Def_Btn_Height];
  72.         x_left       = pos_frame0(1)+dx2;
  73.         y_low        = y_low-2*Def_Btn_Height;
  74.         pos_txt_mod  = [x_left , y_low , 2*Def_Btn_Width , Def_Btn_Height];
  75.         y_low        = y_low-Def_Btn_Height;
  76.         x_left       = pos_frame0(1)+(pos_frame0(3)-Pop_Min_Width)/2;
  77.         pos_pop_mod  = [x_left , y_low , Pop_Min_Width+dx , Def_Btn_Height];
  78.         w_uic        = 3*push_width/2;
  79. xborder      = (pos_frame0(3)-w_uic)/2;
  80.         x_left       = pos_frame0(1)+xborder;
  81.         y_low        = pos_prec_txt(2)-7*Def_Btn_Height;
  82.         pos_display  = [x_left , y_low , w_uic , 2*Def_Btn_Height];
  83.         y_low        = y_low-3*Def_Btn_Height;
  84.         x_left       = pos_frame0(1)+dx2;
  85.         pos_inf_txt  = [x_left , y_low , 2.5*Def_Btn_Width , Def_Btn_Height];
  86.         pos_pus_inf1    = pos_display;
  87.         pos_pus_inf1(2) = pos_inf_txt(2)-2*Def_Btn_Height-dy;
  88.         pos_pus_inf2    = pos_pus_inf1;
  89.         pos_pus_inf2(2) = pos_pus_inf1(2)-3*Def_Btn_Height;
  90. % pos_pus_inf1(1) = pos_pus_inf1(1)-xborder/2;
  91. % pos_pus_inf1(3) = pos_pus_inf1(3)+xborder;
  92.         % String property of objects.
  93.         %----------------------------
  94.         str_mod_txt  = 'Wav. Pack. from 0 to :';
  95.         str_pop_mod  = ['1 ' ; '2 ' ; '3 ' ; '4 ' ; '5 ' ; '6 ' ; '7 ' ; '8 ' ; ...
  96.                         '9 ' ; '10' ; '11' ; '12' ; '13' ; '14'] ;
  97.         str_display  = 'Display';
  98.         str_inf_txt  = 'Information on:';
  99.         str_inf1     = 'Haar Family (HAAR)';
  100.         str_inf2     = 'W Systems';
  101.         str_prec_txt = 'Refinement';
  102.         str_prec_val = ['5 ' ; '6 ' ; '7 ' ; '8 ' ; '9 ' ; '10' ; '11' ; '12'];
  103.         % Command part construction of the window.
  104.         %-----------------------------------------
  105.         utanapar('create',win_loctool, ...
  106.                  'xloc',xlocINI,'bottom',ybottomINI,...
  107.                  'datflag',0,'levflag',0,...
  108.                  'wtype','owt' ...
  109.                  );
  110.         comFigProp = {'Parent',win_loctool,'Unit',win_units};
  111.         comPopProp = {comFigProp{:},'Style','Popup'};
  112.         comPusProp = {comFigProp{:},'Style','Pushbutton'};
  113.         comTxtProp = {comFigProp{:},'Style','Text', ...
  114.            'HorizontalAlignment','left','Backgroundcolor',Def_FraBkColor};
  115.         Tooltip      = 'Number of iterations used to calculate the wavelet packets';
  116.         txt_prec_txt = uicontrol(comTxtProp{:}, ...
  117.                                  'Position',pos_prec_txt,...
  118.                                  'String',str_prec_txt,...
  119.                                  'Tooltip',Tooltip ...
  120.                                   );
  121.         pop_prec_val = uicontrol(comPopProp{:},...
  122.                                  'Position',pos_prec_val,...
  123.                                  'String',str_prec_val,...
  124.                                  'Value',4,...
  125.                                  'Tooltip',Tooltip,...
  126.                                  'Tag',tag_prec_val...
  127.                                  );
  128.         txt_mod_txt  = uicontrol(comTxtProp{:},...
  129.                                  'Position',pos_txt_mod,...
  130.                                  'String',str_mod_txt...
  131.                                  );
  132.         pop_mod_dis  = uicontrol(comPopProp{:},...
  133.                                  'Position',pos_pop_mod,...
  134.                                  'String',str_pop_mod,...
  135.                                  'Value',6,...
  136.                                  'Tag',tag_pop_mod...
  137.                                  );
  138.         pus_display  = uicontrol(comPusProp{:},...
  139.                                  'Position',pos_display,...
  140.                                  'String',xlate(str_display),...
  141.                                  'Tag',tag_display...
  142.                                  );
  143.         txt_inf_txt  = uicontrol(comTxtProp{:},...
  144.                                  'Position',pos_inf_txt,...
  145.                                  'String',str_inf_txt...
  146.                                  );
  147.         pus_inf1     = uicontrol(comPusProp{:},...
  148.                                  'Position',pos_pus_inf1,...
  149.                                  'String',xlate(str_inf1),...
  150.                                  'Tag',tag_pus_inf1...
  151.                                  );
  152.         pus_inf2     = uicontrol(comPusProp{:},...
  153.                                  'Position',pos_pus_inf2,...
  154.                                  'String',xlate(str_inf2),...
  155.                                  'Tag',tag_pus_inf2...
  156.                                  );
  157.         % Callbacks update.
  158.         %------------------
  159.         utanapar('set_cba_num',win_loctool,[pus_display]);
  160.         [pop_fam,pop_num] = utanapar('handles',win_loctool,'fam','num');
  161.         cb_fam = get(pop_fam,'Callback');
  162.         cb_num = get(pop_num,'Callback');
  163.         cba_upd_fam = [mfilename '(''upd_fam'',' str_numwin ');'];
  164.         cba_update  = [mfilename '(''new'',' str_numwin ');'];
  165.         cba_draw_1d = [mfilename '(''draw1d'',' str_numwin ');'];
  166.         cba_inf1    = [mfilename '(''inf1'',' str_numwin ');'];
  167.         cba_inf2    = [mfilename '(''inf2'',' str_numwin ');'];
  168.         set(pop_fam,'Callback',[cb_fam , cba_upd_fam]);
  169.         set(pop_num,'Callback',[cb_num , cba_update]);
  170.         set(pop_prec_val,'Callback',cba_update);
  171.         set(pop_mod_dis,'Callback',cba_update);
  172.         set(pus_display,'Callback',cba_draw_1d);
  173.         set(pus_inf1,'Callback',cba_inf1);
  174.         set(pus_inf2,'Callback',cba_inf2);
  175.         % Setting units to normalized.
  176.         %-----------------------------
  177.         Pos_Graphic_Area = Pos_Graphic_Area./[pos_win(3:4),pos_win(3:4)];
  178.         set(findobj(win_loctool,'Units','pixels'),'Units','normalized');
  179. % Add Context Sensitive Help (CSHelp).
  180. %-------------------------------------
  181. hdl_WPDI_GUI = [txt_prec_txt,pop_prec_val,txt_mod_txt,pop_mod_dis];
  182. wfighelp('add_ContextMenu',win_loctool,hdl_WPDI_GUI,'WPDI_GUI');
  183. %-------------------------------------
  184.         % Memory for stored values.
  185.         %--------------------------
  186.         wmemtool('ini',win_loctool,n_miscella,nb1_stored);
  187.         wmemtool('wmb',win_loctool,n_miscella,...
  188.                        ind_graph_area,Pos_Graphic_Area,...
  189.                        ind_wave_fam,'haar', ...
  190.                        ind_wave_nam,'haar', ...
  191.                        ind_maxnum,6,         ...
  192.                        ind_refinment,0       ...
  193.                        );
  194.         % End waiting.
  195.         %-------------
  196.         set(wfindobj('figure'),'Pointer','arrow');
  197.     case 'upd_fam'
  198.         %**********************************************************%
  199.         %** OPTION = 'upd_fam' -  UPDATE OF THE WAVELET FAMILY   **%
  200.         %**********************************************************%
  201.         win_loctool = varargin{1};
  202.         new = wpdtool('new',win_loctool);
  203.         if new==0 , return; end
  204.         % Handles of tagged objects.
  205.         %---------------------------
  206.         pus_handles  = findobj(win_loctool,'Style','pushbutton');
  207.         pus_inf1     = findobj(pus_handles,'Tag',tag_pus_inf1);
  208.         % Set visible on or off the wavelet number if exists.
  209.         %----------------------------------------------------
  210.         wav_nam = cbanapar('get',win_loctool,'wav');
  211.         [wav_fn,wav_fsn,tabNums] = wavemngr('fields',wav_nam,'fn','fsn','tabNums');
  212.         if size(tabNums,1)<2 ,add = ' wavelet'; else , add = ' wavelets'; end
  213. strPush = sprintf('%s Family (%s)', wav_fn, upper(wav_fsn));
  214.         set(pus_inf1,'String',strPush);
  215.     case 'inf1'
  216.         %*****************************************%
  217.         %** OPTION = 'inf1' - LOCAL INFORMATION **%
  218.         %*****************************************%
  219.         win_loctool     = varargin{1};
  220.         % Getting wavelet.
  221.         %-----------------
  222.         wav_nam = cbanapar('get',win_loctool,'wav');
  223.         wav_fam = wavemngr('fam_num',wav_nam);
  224.         infotxt = [deblankl(wav_fam) 'info.m'];
  225.         [old_info,fig] = whelpfun('getflag');
  226.         if ~isempty(old_info) & strcmp(infotxt,old_info)
  227.             figure(fig); return;
  228.         end
  229.         % Waiting message.
  230.         %-----------------
  231.         wwaiting('msg',win_loctool,'Wait ... loading');
  232.         [str_inf,fid] = wreadinf(infotxt,'noerror');
  233.         if fid==-1
  234.             msg = sprintf('File %s not found !', infotxt);
  235.             errargt(mfilename,msg,'msg');
  236.             wwaiting('off',win_loctool);
  237.             return
  238.         else
  239.             dim     = size(str_inf);
  240.             rowfam  = str_inf(1,:);
  241.             str_inf = str_inf(2:dim(1),:);
  242.             col = 1;
  243.             while all(str_inf(:,col)==' ') , col = col+1; end
  244.             blk  = ' ' ;
  245.             str_inf = [rowfam ; ...
  246.                        str_inf(:,col:dim(2)) blk*ones(dim(1)-1,col-1) ];
  247.         end
  248.         ftnsize = wmachdep('fontsize','winfo');
  249.         whelpfun('create',str_inf,infotxt,ftnsize);
  250.         % End waiting.
  251.         %-------------
  252.         wwaiting('off',win_loctool);
  253.     case 'inf2'
  254.         %*****************************************%
  255.         %** OPTION = 'inf2' - LOCAL INFORMATION **%
  256.         %*****************************************%
  257.         win_loctool     = varargin{1};
  258.         % Handles of tagged objects.
  259.         %---------------------------
  260.         infotxt         = 'infowsys.m';
  261.         [old_info,fig]  = whelpfun('getflag');
  262.         if ~isempty(old_info) & strcmp(infotxt,old_info)
  263.             figure(fig); return;
  264.         end
  265.         % Waiting message.
  266.         %-----------------
  267.         wwaiting('msg',win_loctool,'Wait ... loading');
  268.         [str_inf,fid] = wreadinf(infotxt,'noerror');
  269.         if fid==-1
  270.             msg = sprintf('File %s not found !', infotxt);
  271.             errargt(mfilename,msg,'msg');
  272.             wwaiting('off',win_loctool);
  273.             return
  274.         end
  275.         ftnsize = wmachdep('fontsize','winfo');
  276.         whelpfun('create',str_inf,infotxt,ftnsize);
  277.         % End waiting.
  278.         %-------------
  279.         wwaiting('off',win_loctool);
  280.     case 'draw1d'
  281.         %************************************************%
  282.         %** OPTION = 'draw1d' - DRAW AXES IN 1D        **%
  283.         %************************************************%
  284.         win_loctool = varargin{1};
  285.         [new,Wave_Fam,Wave_Nam,nb_func,prec_val] = wpdtool('new',win_loctool);
  286.         if new==0 , return; end
  287.         % Waiting message.
  288.         %-----------------
  289.         wwaiting('msg',win_loctool,'Wait ... computing');
  290.         % Handles of tagged objects.
  291.         %---------------------------
  292.         fra_handles = findobj(win_loctool,'Style','frame');
  293.         hdl_frame0  = findobj(fra_handles,'Tag',tag_cmd_frame);
  294.         % Update parameters selection before drawing.
  295.         %-------------------------------------------
  296.         wmemtool('wmb',win_loctool,n_miscella, ...
  297.                        ind_wave_fam,Wave_Fam,  ...
  298.                        ind_wave_nam,Wave_Nam,  ...
  299.                        ind_maxnum,nb_func,     ...
  300.                        ind_refinment,prec_val  ...
  301.                        );
  302.         % General graphical parameters initialization.
  303.         %--------------------------------------------
  304.         pos_g_area     = wmemtool('rmb',win_loctool,n_miscella,ind_graph_area);
  305.         pos_hdl_frame0 = get(hdl_frame0,'Position');
  306.         win_units      = 'normalized';
  307.         pos_win        = get(win_loctool,'Position');
  308.         bdx            = 0.08*pos_win(3);
  309.         bdy            = 0.09*pos_win(4);
  310.         bdy_d          = bdy;
  311.         bdy_u          = bdy;
  312.         w_graph        = pos_hdl_frame0(1);
  313.         h_graph        = pos_g_area(4);
  314.         % Computing and displaying wavelets and filters.
  315.         %-----------------------------------------------
  316.         wtype = wavemngr('type',Wave_Nam);
  317.         if wtype==1
  318.             str_wintitle = [Wave_Fam '  Wavelet Packets --> ' Wave_Nam];
  319.         else
  320.             % End waiting.
  321.             %-------------
  322.             wwaiting('off',win_loctool);
  323.             return;
  324.         end
  325.         nb_axes = nb_func+1;
  326.         pos_axe = zeros(nb_func,4);
  327.         if nb_axes<11
  328.             nb2    = ceil(nb_axes/2);
  329.             w_axe  = (w_graph-3*bdx)/2;
  330.             h_axe  = (h_graph-(nb2-1)*bdy-bdy_u-bdy_d)/nb2;
  331.             x_left = bdx;
  332.             y_low  = pos_g_area(2)+pos_g_area(4)-bdy_u-h_axe;
  333.             for k= 1:nb2
  334.                 pos_axe(2*k-1,:) = [x_left,y_low,w_axe,h_axe];
  335.                 pos_axe(2*k,:)   = [x_left+w_axe+bdx,y_low,w_axe,h_axe];
  336.                 y_low            = y_low-h_axe-bdy;
  337.             end
  338.         else
  339.             nb2    = ceil(nb_axes/3);
  340.             w_axe  = (w_graph-4*bdx)/3;
  341.             h_axe  = (h_graph-(nb2-1)*bdy-bdy_u-bdy_d)/nb2;
  342.             x_left = bdx;
  343.             y_low  = pos_g_area(2)+pos_g_area(4)-bdy_u-h_axe;
  344.             for k= 1:nb2
  345.                 pos_axe(3*k-2,:) = [x_left,y_low,w_axe,h_axe]    ;
  346.                 xl               = x_left+w_axe+bdx;
  347.                 pos_axe(3*k-1,:) = [xl,y_low,w_axe,h_axe];
  348.                 xl               = xl+w_axe+bdx;
  349.                 pos_axe(3*k,:)   = [xl,y_low,w_axe,h_axe];
  350.                 y_low            = y_low-h_axe-bdy;
  351.             end
  352.         end
  353.         [wpws,xval] = wpfun(Wave_Nam,nb_func,prec_val);
  354.         hdl_axe =  zeros(1,nb_func);
  355.         xaxis   = [min(xval)    max(xval)];
  356.         % if isequal(Wave_Nam,'dmey') , xaxis = [40 60]; end 
  357.         if ~isequal(get(0,'CurrentFigure'),win_loctool)
  358.             figure(win_loctool);
  359.         end
  360.         for k= 1:nb_axes
  361.             yaxis   = [min(wpws(k,:))-eps   max(wpws(k,:))+eps];
  362.             ecart   = abs(yaxis(2)-yaxis(1))/20;
  363.             yaxis(1) = yaxis(1)-ecart;
  364.             yaxis(2) = yaxis(2)+ecart;
  365.             hdl_axe(k) = axes(...
  366.                               'Parent',win_loctool,   ...
  367.                               'Units',win_units,      ...
  368.                               'Position',pos_axe(k,:),...
  369.                               'DrawMode','Fast',      ...
  370.                               'Xlim',xaxis,           ...
  371.                               'Ylim',yaxis,           ...
  372.                               'Box','On'              ...
  373.                               );
  374.             line(...
  375.                  'Xdata',xval,...
  376.                  'Ydata',wpws(k,:),...
  377.                  'Color','r',...
  378.                  'Parent',hdl_axe(k));
  379.             strlab = ['W' sprintf('%.0f',k-1)];
  380.             if     k==1 , strlab = [strlab '  - phi function -'];
  381.             elseif k==2 , strlab = [strlab '  - psi function -'];
  382.             end
  383.             wtitle(strlab,'Parent',hdl_axe(k));
  384.         end
  385.         % Display status line.
  386.         %---------------------
  387.         wfigtitl('string',win_loctool,str_wintitle,'on');
  388.         % Axes attachment.
  389.         %-----------------
  390.         dynvtool('init',win_loctool,[],hdl_axe,[],[0 0]);
  391.         % Setting units to normalized.
  392.         %-----------------------------
  393.         set(findobj(win_loctool,'Units','pixels'),'Units','normalized');
  394.         % End waiting.
  395.         %-------------
  396.         wwaiting('off',win_loctool);
  397.     case 'new'
  398.         %*************************************************%
  399.         %** OPTION = 'new' -  test drawing parameters   **%
  400.         %*************************************************%
  401.         win_loctool     = varargin{1};
  402.         % Handles of tagged objects.
  403.         %---------------------------
  404.         pop_handles  = findobj(win_loctool,'Style','popupmenu');
  405.         pop_mod_dis  = findobj(pop_handles,'Tag',tag_pop_mod);
  406.         pop_prec_val = findobj(pop_handles,'Tag',tag_prec_val);
  407.         % Test Main parameters selection before drawing.
  408.         %-----------------------------------------------
  409.         Wave_Nam = cbanapar('get',win_loctool,'wav');
  410.         Wave_Fam = wavemngr('fam_num',Wave_Nam);
  411.         prec_val = get(pop_prec_val,'Value')+4;
  412.         ind      = get(pop_mod_dis,'value');
  413.         strnum   = get(pop_mod_dis,'string');
  414.         nb_func  = wstr2num(strnum(ind,:));
  415.         varargout{1} = 0;
  416.         [wfam,wnam,maxn,raf] = wmemtool('rmb',win_loctool,n_miscella,...
  417.                                 ind_wave_fam,ind_wave_nam,...
  418.                                 ind_maxnum,ind_refinment);
  419.         if raf~=prec_val | ~strcmp(wnam,Wave_Nam) | ...
  420.            ~strcmp(wfam,Wave_Fam) | nb_func~=maxn
  421.             varargout = {1,Wave_Fam,Wave_Nam,nb_func,prec_val};
  422.         else
  423.             varargout{1} = 0;
  424.             return
  425.         end
  426.         % Setting refinment to 0 (as flag).
  427.         %----------------------------------
  428.         wmemtool('wmb',win_loctool,n_miscella,ind_refinment,0);
  429.         % Cleaning the graphical part.
  430.         %-----------------------------
  431.         dynvtool('stop',win_loctool);
  432.         axe_handles = findobj(get(win_loctool,'children'),'flat', ...
  433.                          'type','axes','visible','on');
  434.         delete(axe_handles);
  435.         wfigtitl('vis',win_loctool,'off');
  436.     case 'demo'
  437.         %*******************************************%
  438.         %** OPTION = 'demo' -  for DEMOS or TESTS **%
  439.         %*******************************************%
  440.         win_loctool = varargin{1};
  441.         Wave_Nam    = varargin{2};
  442.         % Handles of tagged objects.
  443.         %---------------------------
  444.         children     = get(win_loctool,'Children');
  445.         uic_handles  = findobj(children,'flat','type','uicontrol');
  446.         pop_handles  = findobj(uic_handles,'Style','popupmenu');
  447.         pop_prec_val = findobj(pop_handles,'Tag',tag_prec_val);
  448.         pop_mod_dis  = findobj(pop_handles,'Tag',tag_pop_mod);
  449.         pus_handles  = findobj(win_loctool,'Style','pushbutton');
  450.         pus_inf1     = findobj(pus_handles,'Tag',tag_pus_inf1);
  451.         cbanapar('set',win_loctool,'wav',Wave_Nam);
  452.         [Wave_Fam,tabNums] = wavemngr('fields',Wave_Nam,'fsn','tabNums');
  453.         if nargin>3
  454.             set(pop_prec_val,'Value',varargin{3});
  455.             if nargin>4 , set(pop_mod_dis,'Value',varargin{4}); end 
  456.         end
  457.         new = wpdtool('new',win_loctool);
  458.         str_inf1 = [upper(Wave_Fam) ' wavelet'] ;
  459.         if size(tabNums,1)>1
  460.             str_inf1 = [str_inf1 's'] ;
  461.         end
  462.         set(pus_inf1,'String',str_inf1);
  463.         wpdtool('draw1d',win_loctool);
  464.     case 'close'
  465.     otherwise
  466.         errargt(mfilename,'Unknown Option','msg');
  467.         error('*');
  468. end