function hndlMatrix=dmndbtns(figNumber)
%
%  Name:   dmndbtns
%
%  Usage:  mhndlMatrix=dmndbtns(fignumber)
%
%  Sets up all the menus for the main window 
%	hndlMatrix(1,:)  = plot window handles
%	hndlMatrix(2,:)  = peak picking window handles 
%	hndlMatrix(3,:)  = rational polynomial window handles
%	hndlMatrix(4,:)  = ERA window handles
%	hndlMatrix(5,:)  = Strain Energy/Damage index methods
%	hndlMatrix(6,:)  = Analyze Complex Modes
%	hndlMatrix(7,:)  = Analyze Real Modes
%	hndlMatrix(8,:)  = Flexibility Analysis
%	hndlMatrix(9,:)  = Complex Exponential window handles
%	hndlMatrix(10,:)  = MRPT window handles
%	hndlMatrix(11,:)  = Mode Shape Expansion  window handles
%
%  Version SWD970603
%
%  Author(s): Phillip Cornwell, cornwell@lanl.gov
%	      Scott W. Doebling, doebling@lanl.gov
%	      Erik G. Straser, estraser@lanl.gov
%
%  Institution: Los Alamos National Laboratory, ESA-EA
%
%  Copyright (c) 1996, The Regents of the University
%       of California. (See top level of code for
%       full copyright statement.)

global hera;
global herac;

%%===============================
%%  call each *btns function
%%===============================
hplot  = plotbtns(figNumber);
hpp    = pcpkbtns(figNumber);
hratp  = ratpbtns(figNumber);
hera   = erabtns (figNumber);
hsemb  = sembbtns(figNumber);
hanalc = ancpbtns(figNumber);
hanalr = anrebtns(figNumber);
hflex  = flexbtns(figNumber);
hce    = CEbtns(figNumber);
hmrpt  = mrptbtns(figNumber);
hmse   = msebtns(figNumber);

%%===============================
%%  put handles into a matrix
%%===============================
lenplot  = length(hplot);
lenpp    = length(hpp);
lenrat   = length(hratp);
lenera   = length(hera);
lenSEM   = length(hsemb);
lenanalc = length(hanalc);
lenanalr = length(hanalr);
lenflex  = length(hflex);
lence    = length(hce);
lenmrpt  = length(hmrpt);
lenmse   = length(hmse);

maxlen = max([lenplot;lenpp;lenrat;lenera;lenSEM;lenanalc;lenanalr;lenflex;lence;lenmrpt;lenmse]);

%%==================================================
%  Pad the vectors before we concatenate in order
%  to get a genuine matrix.  Pad the back with zeros
%%==================================================
hplot  = [hplot zeros(1,maxlen-lenplot)];
hpp    = [hpp zeros(1,maxlen-lenpp)];
hratp  = [hratp zeros(1,maxlen-lenrat)];
hera   = [hera zeros(1,maxlen-lenera)];
hsemb  = [hsemb zeros(1,maxlen-lenSEM)];
hanalc = [hanalc zeros(1,maxlen-lenanalc)];
hanalr = [hanalr zeros(1,maxlen-lenanalr)];
hflex  = [hflex zeros(1,maxlen-lenflex)];
hce    = [hce zeros(1,maxlen-lence)];
hmrpt  = [hmrpt zeros(1,maxlen - lenmrpt)];
hmse   = [hmse  zeros(1,maxlen - lenmse)];

hndlMatrix = [hplot;hpp;hratp;hera;hsemb;hanalc;hanalr;hflex;hce;hmrpt;hmse];

drawnow

return
