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.2 2007/07/10 05:37:13 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.2 2007/07/10 05:37:13 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
0026 WRAP_LEGEND_STRINGS = 10;  % Wrap legend strings at this value
0027 XML_SET_SIZE = 50000;      % Set the maximum line length for writing data sets to XML
0028 
0029 
0030 %--------------------------------------------------------------------------
0031 %--------------------------------------------------------------------------
0032 % NO NEED TO EDIT BELOW HERE
0033 %--------------------------------------------------------------------------
0034 %--------------------------------------------------------------------------
0035 
0036 v = ver('LTPDA');
0037 
0038 logo = {...
0039 '                                        ',...
0040 '                  ****                  ',...
0041 '                   **                   ',...
0042 '              -------------             ',...
0043 '          ////       /     \\\\         ',...
0044 '       ///          /          \\\      ',...
0045 '      |            /              |     ',...
0046 '  ** |    +----+  /      +----+    | ** ',...
0047 '  ***|    |    |//-------|    |    |*** ',...
0048 '  ** |    +----+        /+----+    | ** ',...
0049 '     |                /           |     ',...
0050 '       \\\            /        ///      ',...
0051 '          \\\\      //     ////         ',...
0052 '              -------------             ',...
0053 '                   **                   ',...
0054 '                  ****                  ',...
0055 };
0056 
0057 l1 = '+----------------------------------------------------+';
0058 ll = length(l1);
0059 
0060 disp(l1);
0061 disp('|                                                    |')
0062 for j=1:length(logo)
0063   disp([strpad(sprintf('|      %s  ', char(logo{j})), ll-1) '|']);
0064 end
0065 disp([strpad('|', ll-1) '|'])
0066 disp([strpad(sprintf('|          Welcome to %s', v.Name), ll-1) '|'])
0067 disp([strpad('|', ll-1) '|'])
0068 disp([strpad(sprintf('|                 Version: %s', v.Version), ll-1) '|'])
0069 disp([strpad(sprintf('|                 Release: %s', v.Release), ll-1) '|'])
0070 disp([strpad(sprintf('|                    Date: %s', v.Date), ll-1) '|'])
0071 disp([strpad('|', ll-1) '|'])
0072 disp(l1);
0073 
0074 %--------------------------------------------------------------------------
0075 % set page properties for printing
0076 if strcmp(upper(USE_LTPDA_PRINT_SETTINGS), 'YES')
0077   set(0,'DefaultFigurePaperOrientation','portrait');
0078   set(0,'DefaultFigurePaperType','A4');
0079   set(0,'DefaultFigurePaperUnits','inches');
0080 end
0081 
0082 %--------------------------------------------------------------------------
0083 % Plot settings
0084 if strcmp(upper(USE_LTPDA_PLOT_SETTINGS), 'YES')
0085   set(0,'DefaultAxesFontSize',14);
0086   set(0,'DefaultAxesFontWeight','bold');
0087   set(0,'DefaultAxesLineWidth', 1.1);
0088   set(0,'DefaultLineLineWidth', 1.1);
0089   set(0,'defaultlinemarkersize',10)
0090   set(0,'DefaultAxesXColor',[0.2 0.2 0.2]);
0091   set(0,'DefaultAxesYColor',[0.2 0.2 0.2]);
0092   set(0,'DefaultAxesGridLineStyle','-');
0093   set(0,'DefaultAxesMinorGridLineStyle','-');
0094   set(0,'defaultfigurenumbertitle','on');
0095   set(0,'DefaultAxesLineWidth',1)
0096   set(0,'DefaultFigureColor', 'w');
0097   set(0,'DefaultFigurePosition', [100 100 800 600]);
0098   set(0,'DefaultFigurePaperPositionMode','auto')
0099 
0100 end
0101 
0102 %--------------------------------------------------------------------------
0103 % format of numbers on MATLAB terminal
0104 format long g
0105 
0106 % ------------------------------------------------------------------------
0107 % MySQL Server Settings
0108 %
0109 
0110 setappdata(0, 'mysql_server', DBHOST);
0111 setappdata(0, 'mysql_user',   DBUSER);
0112 setappdata(0, 'mysql_passwd', DBPASSWD);
0113 setappdata(0, 'mysql_db',     DBNAME);
0114 setappdata(0, 'mysql_driver', DBDRIVER);
0115 setappdata(0, 'mysql_url',    sprintf('jdbc:mysql://%s/%s',DBHOST,DBNAME));
0116 
0117 % add mysql JDBC driver to the java path
0118 mysqldriver = [fileparts(which('ltpda_startup')) '/../mysql/mysql-connector-java-5.0.6-bin.jar'];
0119 javaaddpath(mysqldriver);
0120 
0121 % ------------------------------------------------------------------------
0122 % General Variables
0123 setappdata(0, 'wrapstringat', WRAP_STRINGS);  % wrap strings at this length for
0124                                               % history plot nodes
0125 setappdata(0, 'wraplegendstringat', WRAP_LEGEND_STRINGS);  % wrap strings at this length for legends
0126 setappdata(0, 'xmlsetsize', XML_SET_SIZE); % Max size of an xml data set <Set></Set>
0127 
0128 setappdata(0,'ltpda_default_plot_colors', {[0.8 0.2 0.2],     ...
0129                                            [0.2 0.2 0.8],     ...
0130                                            [0.2 0.9 0.2],     ...
0131                                            [0.37 0.9 0.83],   ...
0132                                            [0.888 0.163 0.9], ...
0133                                            [0 0 0],           ...
0134                                            [0 207 255]/255,   ...
0135                                            [255 128 0]/255,   ...
0136                                            [143 0 0]/255,     ...
0137                                            [255 207 0]/255,   ...
0138                                            [0.9 0.266 0.593]});
0139 
0140 % ------------------------------------------------------------------------
0141 % Version Variables
0142 
0143 vs = ver;
0144 for j=1:length(vs)
0145   v = vs(j);
0146   switch v.Name
0147     case 'MATLAB'
0148       matlab_version = [v.Version ' ' v.Release];
0149     case 'Signal Processing Toolbox'
0150       sigproc_version = [v.Version ' ' v.Release];
0151     case 'LTPDA Toolbox'
0152       ltpda_version = [v.Version ' ' v.Release];
0153   end
0154 end
0155 
0156 setappdata(0, 'matlab_version', matlab_version);
0157 setappdata(0, 'sigproc_version', sigproc_version);
0158 setappdata(0, 'ltpda_version', ltpda_version);
0159 
0160 % END

Generated on Wed 04-Jul-2007 19:03:10 by m2html © 2003