function l=addtoexplorer(b, m, h)
% MLEXPLORER
% This builds up a structure with the appropriate form and passes it into
% the ADDTOEXPLORER command.  Note, it is not the "officially approved" content.
% This is just a demonstration of one possible content.

% Matthew Simoneau (modified by Chris Norman)
% Copyright 1984-2000 The MathWorks, Inc.
% $Revision: 1.6 $  $Date: 2000/06/01 03:46:55 $

%==========================================
	for i = 1:size(m, 2)
        e = m(i);
	   	if isstruct(e.childmenu)
            r = b.AddExplorerEntry (h, 0, e.label, '', e.image);
        	addtoexplorer(b, e.childmenu, r);
        else
        	r = b.AddExplorerEntry (h, 0, e.label, e.callback, e.image);
        end
    end
l = r;


