Code covered by the BSD License  

Highlights from
Statistical Learning Toolbox

from Statistical Learning Toolbox by Dahua Lin
Functions for statistical learning, pattern recognition and computer vision, covering many topics.

Description of slsharedisp_attach
Home > sltoolbox > utils > slsharedisp_attach.m

slsharedisp_attach

PURPOSE ^

SLSHAREDISP_ATTACH Attachs to global display options

SYNOPSIS ^

function slsharedisp_attach(name, varargin)

DESCRIPTION ^

SLSHAREDISP_ATTACH Attachs to global display options

 $ Syntax $
   - slsharedisp_attach(name, ...)

 $ Arguments $
   - name:     the name of the invoker

 $ Description $
   - slsharedisp_attach(name, ...) attachs the current function to
     the global display. You can specify the following properties
       - 'show':       whether to show process information
                       (default = true)
       - 'indent':     the relative indent (default = 0)
     Please note that the actual properties set to the current displayer
     is determined by both the properties set here and the properties
     of the previous displayer in stack:
       new.show = current.show && previous.show;
       new.indent = current.indent + previous.indent;     

 $ History $
   - Created by Dahua Lin, on Aug 29, 2006

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
  • slkmeansex SLKMEANSEX Performs Generalized K-means
  • sliterproc SLITERPROC Runs a general iterative process
  • slproglearn SLPROGLEARN Performs Progressive Learning from sample source
  • slreevallearn SLREEVALLEARN Performs an iterative learning based on re-evaluation
  • slfmm SLFMM Learns a Finite Mixture Model (FMM)

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function slsharedisp_attach(name, varargin)
0002 %SLSHAREDISP_ATTACH Attachs to global display options
0003 %
0004 % $ Syntax $
0005 %   - slsharedisp_attach(name, ...)
0006 %
0007 % $ Arguments $
0008 %   - name:     the name of the invoker
0009 %
0010 % $ Description $
0011 %   - slsharedisp_attach(name, ...) attachs the current function to
0012 %     the global display. You can specify the following properties
0013 %       - 'show':       whether to show process information
0014 %                       (default = true)
0015 %       - 'indent':     the relative indent (default = 0)
0016 %     Please note that the actual properties set to the current displayer
0017 %     is determined by both the properties set here and the properties
0018 %     of the previous displayer in stack:
0019 %       new.show = current.show && previous.show;
0020 %       new.indent = current.indent + previous.indent;
0021 %
0022 % $ History $
0023 %   - Created by Dahua Lin, on Aug 29, 2006
0024 %
0025 
0026 %% parse and verify input arguments
0027 
0028 opts.show = true;
0029 opts.indent = 0;
0030 opts = slparseprops(opts, varargin{:});
0031 opts.name = name;
0032 
0033 %% Main
0034 
0035 global GLOBAL_SHARE_DISPLAYER;
0036 
0037 s = GLOBAL_SHARE_DISPLAYER;
0038 
0039 if isempty(s)
0040     s = create_displayer([], opts);
0041 else
0042     n = length(s);
0043     s(n+1, 1) = create_displayer(s(n), opts);
0044 end
0045 
0046 GLOBAL_SHARE_DISPLAYER = s;
0047 
0048     
0049     
0050 %% Core function
0051 
0052 function dp = create_displayer(prevdp, curdp)
0053 
0054 dp.name = curdp.name;
0055 
0056 if isempty(prevdp)
0057     dp.indent = curdp.indent;
0058     dp.show = curdp.show;
0059     dp.indentstep = 4;
0060 else
0061     dp.indent = prevdp.indent + curdp.indent;
0062     dp.show = prevdp.show && curdp.show;
0063     dp.indentstep = prevdp.indentstep;
0064 end
0065 
0066 
0067 
0068 
0069 
0070 
0071 
0072

Generated on Wed 20-Sep-2006 12:43:11 by m2html © 2003

Contact us at files@mathworks.com