
Installation notes for installing the SPC Toolbox
------------------------------------------------- 
LT Dennis W. Brown
4-30-94 Naval Postgraduate School 
Monterey, CA 93943


The SPC Toolbox is distributed in TAR format via the internet.


Unix install:  
------------- 
1) Create a subdirectory in the "../matlab/toolbox" directory called
"spctools".

2) Copy the "spctools.tar" file to this directory.

3) Extract the tar file with the command "tar xvf spctools.tar".

NOTE: If you are installing spctools.sh downloaded from the ftp site at
ftp.mathworks.com, use the following

1) ignore.

2) Copy the spctools.sh file to the "../matlab/toolbox" directory.

3) Extract the sh file with the command "sh spctools.sh".  Extracting
the sh file will create the "spctools" subdirectory.


4) Modify the Matlab resource file to append the "spctools" and all the
subdirectories contained in it to the matlabpath.  Optionally, a link
can be made from a directory already contained in the matlabpath to
point to the file spcpath.m in the spctools directory.  In this
configuration, users must first execute the spcpath program to gain
full access to the SPC Toolbox.


NOTE: The SPC Toolbox does not have to be installed in the toolbox
subdirectory.  If you are not installing in the toolbox directory,
substitute the name of the directory you wish to install it into in the
steps above and below.


Files 
----- 
After extracting the SPC Toolbox, the spctools directory will contain a
number of C-shell scripts, m-files and data files, and a number of
subdirectories.  The SPC Toolbox commands are grouped into the
subdirectories according to function.


C-Shell scripts: 
---------------- 
spcsetup - Script to set the file permissions on all the SPC Toolbox
files.  This should be executed once to ensure proper file permissions
are set.

spcmex - Script to compile mex files on UNIX machines.  The toolbox is
distributed with Sun4 mex files.  If you are running on an machine
other than a sun4, you will have to execute this script.

spctar - Script to create a tar file containing the SPC Toolbox.

spc2sun - Script to copy the SPC Toolbox from an MS-DOS formatted
floppy disk containing the SPC Toolbox from a directory called
"spctools".  The script uses the mtools commands for DOS copying.  
The SPC toolbox is installed into the current directory on the Sun
workstation.

spc2flop - Script to copy the SPC Toolbox from a Sun to a MS-DOS
formatted floppy disk.  The script places all the necessary files a
directory structure beginning with the directory "spctools" on the
floppy disk.  The MS-DOS mex files are copied to the floppy so that it
may then be used to install the SPC Toolbox on a PC.  This file will
have to be edited to ensure the SPCDIR variable points to the spctools
directory.  The script should be edited to ensure the proper disk drive
if pointed to the the "drive" variable.  The SPC Toolbox requires a
high density (1.4 MByte) floppy.  The user is asked if they want to
format the floppy before the files are copied.



M-files:  
-------- 
spcpath - Program to append the SPC toolbox directories to the users
MATLABPATH.  This script is used when the SPC Toolbox is installed such
that to access it, the user must first execute this program.  If the
SPC Toolbox has not been setup in the toolbox directory (or the MATLAB
environment variable does not set or not set to point to the
"../matlab" directory), this file will have to be edited so that the
"matdir" variable points the the "../matlab" directory.


spcdata - Loads the data used in the SPC Toolbox documentation into the
Matlab workspace.  If the SPC Toolbox has not been setup in the toolbox
directory (or the MATLAB environment variable does is not set or not
set to point to the "../matlab" directory), this file will have to be
edited so that the "matdir" variable points the the "../matlab"
directory.

spconfig - Copies "spcolors.m", "spcbandw.m" and "spcolor.m"
configuration files to the users home directory.  The user can then
edit the spcolor.m or spcbandw.m files to suit their preference and
then copy them over the spcolors.m file.  For this file to override the
one in the SPC Toolbox directory, it must be reachable first in the
MATLABPATH.  If the SPC Toolbox has not been setup in the toolbox
directory (or the MATLAB environment variable does is not set or not
set to point to the "../matlab" directory), this file will have to be
edited so that the "matdir" variable points the the "../matlab"
directory.

spc2flop - Program a user can use to copy the SPC Toolbox to an MS-DOS
formatted floppy disk.  The program simply executes the spc2flop
C-shell script.


Use of undocumented functions 
----------------------------- 
The SPC Toolbox has made use of one undocumented function, one
undocumented m-file, and one undocumented uicontrol property.  In the
case of the uicontrol "Enable" property, the Mathworks made extensive
use of it in their Matlab Expo demonstration.  Thus, any version that
ships with the Matlab Expo should not have a problem running the SPC
Toolbox.

The undocumented built-in function "gs_modal_warn" provides a modal
dialog box for reporting errors to the user and requires their
acknowledgement before any continuation with Matlab operation.  The
undocumented m-file provides the same functionality but is not modal.
Because these two functions are not included in every version of
Matlab, some problems may occur.  To avoid this, the only use of these
functions are in the m-file SPCWARN.M in the spctools/progtool
directory.  You should edit this file if your version of Matlab does
not support either of these functions.  This file check the computer it
is running on and determines if it is OK to run either function.  YOU
have to tell the function it is OK.  Simply edit this file to include
your computer in the comparison operation if the following command will
create a dialog box on your screen.

	>> gs_modal_dialog('Test','OK')

The file SPCWARN.M has been shipped with the gs_modal_dialog command
enabled for PCWIN and SUN4 computers.


PC Installation 
--------------- 
See the Readme.m file for instructions on installing the SPC Toolbox on
MS-DOS computers.
