Home > atmlab > atmlab > addsite.m

addsite

PURPOSE ^

addsite Adds site-specific directory to path

SYNOPSIS ^

function addsite

DESCRIPTION ^

 addsite Adds site-specific directory to path

 To be called as soon as site-specific info is needed, but no sooner.

 IN  none
 OUT none

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

addsite.m

SOURCE CODE ^

0001 function addsite
0002 
0003 % addsite Adds site-specific directory to path
0004 %
0005 % To be called as soon as site-specific info is needed, but no sooner.
0006 %
0007 % IN  none
0008 % OUT none
0009 
0010 toppath = atmlab_path;
0011 
0012 if isnan(atmlab('SITE'))
0013     warning('ATMLAB:nosite', 'No site configured, site-specific functions will fail');
0014 else
0015     sitedir = fullfile(toppath, 'site-specific', atmlab('SITE'));
0016     if exist(sitedir, 'dir')
0017         addpath(sitedir);
0018 %         % execute any initialisation m-files
0019 %         W = whichfiles('*init.m', sitedir);
0020 %         for i = 1:length(W)
0021 %             run(W{1});
0022 %         end
0023     else
0024         warning('ATMLAB:unkownsite','Unknown site: %s',atmlab('SITE'));
0025         atmlab('SITE', NaN );
0026     end
0027 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005