function [] = gmdspca (args)
%  GMDSPCA: Runs the program for face analysis
%   
%       GENERAL
%   
%        [] = GMDSPCA () 
%
%       ABOUT
%         -Created:     March 2011
%         -Last update: March 2011
%         -Revision:    0.0.1
%         -Author:      Dr. R. S. Schestowitz
%  =================================================================


fid = fopen('Settings','r');

run_niced = fgets(fid);

display_splash_screen = fgets(fid);

% get some settings from the file

if (str2num(display_splash_screen(1)) == 1),
    splash_handle = splash;
          % display splash screen
    if (strcmp(getenv('OS'), 'Linux'))
      if (str2num(run_niced(1)) == 1),
	      % run with CPU at lower capacity
	      unix('nice mbr');
          % mbr is a scripts that runs register from outside MATLAB without
          % the splash screen
      else
	close(splash_handle);
	register;
      end	   
    else
    close(splash_handle);
       % if not on Linux
        register;
    end      
      % close the splash screen once the main window is open
    clc;
else
    register;
    clc;
       % clear screen when main window is open
end

generate_documentation = fgets(fid);