% a replacement for startup1.m which supports user defined colors
% and multiple graphics windows

%       S.Halevy 7/31/92
%       Copyright (c) 1992 by the MathWizards

% load the built-in functionality         
%_loadlib

% Graphics Windows Placement (8 graphics windows)
_xw=[0.59   0   0.2 0.25
    0.79   0        0.2 0.25
    0.59   0.25   0.2 0.25
    0.79   0.25   0.2 0.25
    0.59   0.5     0.2 0.25
    0.79   0.5     0.2 0.25
    0.59   0.75   0.2 0.25
    0.79   0.75   0.2 0.25];

%Graphics Windows Titles
_xt=['G1'
     'G2'
     'G3'
     'G4'
     'G5'
     'G6'
     'G7'
     'G8'];

%define palette colors (RGB values)
_pl=[127   0 127
       0   0   0          % black
     255   0   0          % red
       0 255   0          % green
       0   0 255          % blue
       0 255 255          % light blue
     255   0 255          % magenta
     255 255   0          % yellow
     127 127 127          % dark gray
     127   0   0          % dark red
       0 127   0          % dark green
       0   0 127          % dark blue
       0 127 127          % dark indigo
     127   0 127          % purple
     127 127   0          % dark yellow
     192 192 192          % light gray
      64 127   0
     127  64   0
     127   0  64
     127  64  64
      64   0  64
      64  64 127
     127 255   0
     255 127 255
       0 255 127
     255   0 127
     255 127 127];

gwinit(_xw,_xt,_pl);   % initialize Graphic Windows

% you can clear these variables now
% clear _xw,_xt,_pl

% define constants which can be global
i=1I;
j=1J;
e=2.71828182845904523536;
disp('startup completed')
