Home > m > etc > ltpda_startup.m

ltpda_startup

PURPOSE ^

This is the startup file for ltpda. It should be run once in the MATLAB

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 This is the startup file for ltpda. It should be run once in the MATLAB
 session before using any features of ltpda. The best way to ensure this
 is to create a file called startup.m and put this somewhere in your
 MATLAB path. In this file you should have the command 'ltpda_startup'.
 
 M Hewitson 16-03-07
 
 $Id: ltpda_startup.html,v 1.1 2007/06/08 14:15:09 hewitson Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % This is the startup file for ltpda. It should be run once in the MATLAB
0002 % session before using any features of ltpda. The best way to ensure this
0003 % is to create a file called startup.m and put this somewhere in your
0004 % MATLAB path. In this file you should have the command 'ltpda_startup'.
0005 %
0006 % M Hewitson 16-03-07
0007 %
0008 % $Id: ltpda_startup.html,v 1.1 2007/06/08 14:15:09 hewitson Exp $
0009 %
0010 
0011 %--------------------------------------------------------------------------
0012 % User Configurable parameters
0013 %
0014 
0015 USE_LTPDA_PRINT_SETTINGS = 'Yes';     % Choose LTPDA Print setup
0016 USE_LTPDA_PLOT_SETTINGS  = 'Yes';     % Choose LTPDA Plot setup
0017 
0018 DBHOST   = 'localhost';               % Set AO Repository hostname
0019 DBHOST   = '130.75.117.37';           % Set AO Repository hostname
0020 DBUSER   = 'aouser';                  % Set AO Repository username
0021 DBPASSWD = 'aouser';                  % Set AO Repository password
0022 DBNAME   = 'aod';                     % Set AO Repository database name
0023 DBDRIVER = 'com.mysql.jdbc.Driver';   % Set AO Repository database driver
0024 
0025 WRAP_STRINGS = 8;     % Wrap strings at this value (needed by wrapstring.m)
0026 XML_SET_SIZE = 50000; % Set the maximum line length for writing data sets to XML
0027 
0028 
0029 %--------------------------------------------------------------------------
0030 %--------------------------------------------------------------------------
0031 % NO NEED TO EDIT BELOW HERE
0032 %--------------------------------------------------------------------------
0033 %--------------------------------------------------------------------------
0034 
0035 v = ver('LTPDA');
0036 
0037 logo = {...    
0038 '                                        ',...
0039 '                  ****                  ',...
0040 '                   **                   ',...
0041 '              -------------             ',...
0042 '          ////       /     \\\\         ',...
0043 '       ///          /          \\\      ',...
0044 '      |            /              |     ',...
0045 '  ** |    +----+  /      +----+    | ** ',...
0046 '  ***|    |    |//-------|    |    |*** ',...
0047 '  ** |    +----+        /+----+    | ** ',...
0048 '     |                /           |     ',...
0049 '       \\\            /        ///      ',...
0050 '          \\\\      //     ////         ',...
0051 '              -------------             ',...
0052 '                   **                   ',...
0053 '                  ****                  ',...
0054 };
0055 
0056 l1 = '+----------------------------------------------------+';
0057 ll = length(l1);
0058 
0059 disp(l1);
0060 disp('|                                                    |')
0061 for j=1:length(logo)
0062   disp([strpad(sprintf('|      %s  ', char(logo{j})), ll-1) '|']);
0063 end
0064 disp([strpad('|', ll-1) '|'])
0065 disp([strpad(sprintf('|          Welcome to %s', v.Name), ll-1) '|'])
0066 disp([strpad('|', ll-1) '|'])
0067 disp([strpad(sprintf('|                 Version: %s', v.Version), ll-1) '|'])
0068 disp([strpad(sprintf('|                 Release: %s', v.Release), ll-1) '|'])
0069 disp([strpad(sprintf('|                    Date: %s', v.Date), ll-1) '|'])
0070 disp([strpad('|', ll-1) '|'])
0071 disp(l1);
0072 
0073 %--------------------------------------------------------------------------
0074 % set page properties for printing
0075 if strcmp(upper(USE_LTPDA_PRINT_SETTINGS), 'YES')
0076   set(0,'DefaultFigurePaperOrientation','portrait');
0077   set(0,'DefaultFigurePaperType','A4');
0078   set(0,'DefaultFigurePaperUnits','inches');
0079 end
0080 
0081 %--------------------------------------------------------------------------
0082 % Plot settings
0083 if strcmp(upper(USE_LTPDA_PLOT_SETTINGS), 'YES')
0084   set(0,'DefaultAxesFontSize',14);
0085   set(0,'DefaultAxesFontWeight','bold');
0086   set(0,'DefaultAxesLineWidth', 1.1);
0087   set(0,'DefaultLineLineWidth', 1.1);
0088   set(0,'defaultlinemarkersize',10)
0089   set(0,'DefaultAxesXColor',[0.2 0.2 0.2]);
0090   set(0,'DefaultAxesYColor',[0.2 0.2 0.2]);
0091   set(0,'DefaultAxesGridLineStyle','-');
0092   set(0,'DefaultAxesMinorGridLineStyle','-');
0093   set(0,'defaultfigurenumbertitle','on');
0094   set(0,'DefaultAxesLineWidth',1)
0095   set(0,'DefaultFigureColor', 'w');
0096   set(0,'DefaultFigurePosition', [100 100 800 600]);
0097   set(0,'DefaultFigurePaperPositionMode','auto')
0098 end
0099 
0100 %--------------------------------------------------------------------------
0101 % format of numbers on MATLAB terminal
0102 format long g
0103 
0104 % ------------------------------------------------------------------------
0105 % MySQL Server Settings
0106 %
0107 
0108 setappdata(0, 'mysql_server', DBHOST);
0109 setappdata(0, 'mysql_user',   DBUSER);
0110 setappdata(0, 'mysql_passwd', DBPASSWD);
0111 setappdata(0, 'mysql_db',     DBNAME);
0112 setappdata(0, 'mysql_driver', DBDRIVER);
0113 setappdata(0, 'mysql_url',    sprintf('jdbc:mysql://%s/%s',DBHOST,DBNAME));
0114 
0115 % add mysql JDBC driver to the java path
0116 mysqldriver = [fileparts(which('ltpda_startup')) '/../mysql/mysql-connector-java-5.0.6-bin.jar'];
0117 javaaddpath(mysqldriver);
0118 
0119 % ------------------------------------------------------------------------
0120 % General Variables
0121 setappdata(0, 'wrapstringat', WRAP_STRINGS);  % wrap strings at this length for
0122                                               % history plot nodes
0123 
0124 setappdata(0, 'xmlsetsize', XML_SET_SIZE); % Max size of an xml data set <Set></Set>
0125 
0126 % END

Generated on Fri 08-Jun-2007 16:09:11 by m2html © 2003