Global Index (short | long) | Local contents | Local Index (short | long)
Define global variables that are commonly used. This command may be used at any time, though it should be executed upon startup.
This script calls | |
---|---|
% set some defaults global CURDIR USER CURDIR = ['cd' cd]; USER = getenv('USER'); % set graphics defaults global FRAME XAX YAX XAX2 YAX2 XAX3 YAX3 % The following defaults are what I like to use. Edit % them to customize your default settings. if strcmp(getenv('USER'), USER); % Set defaults for the root session % get(0, 'Default') returns values you can set pos = get(0,'Screensize'); pos2 = [2 pos(4)-round(8.5*pos(3)/(2*11))-77 ... round(pos(3)/2) round(8.5*pos(3)/(2*11))]; set(0,'defaultFigurePosition',pos2); set(0,'defaultFigureColor', [1 1 1]); color_publish; set(0,'defaultFigureColormap',cmap2); %set(0,'DefaultTextFontName','Helvetica'); set(0,'DefaultTextFontSize',10); %set(0,'DefaultAxesFontName','Helvetica'); set(0,'DefaultAxesFontSize',8); set(0,'DefaultAxesBox','on'); set(0,'DefaultSurfaceEdgeColor','none'); set(0,'DefaultSurfaceFaceColor','flat'); if isempty(FRAME); FRAME=[0 360 -90 90]; end; end %-------------------------------------------------------------------- DEFINED_GLOBALS=1; % Subplot sizes global HSZ VSZ MIDH MIDV TMARG if isempty(HSZ); HSZ = 0.8182; end if isempty(VSZ); VSZ = 0.7647; end if isempty(MIDH); MIDH = 0; end if isempty(MIDV); MIDV = 0; end if isempty(TMARG); TMARG = 0.1176; end global x_coasts x_continents x_islands x_lakes global y_coasts y_continents y_islands y_lakes if isempty(x_coasts); load coast; x_coasts = long'; y_coasts = lat'; end global COASTWIDTH GRDX GRDY if isempty(COASTWIDTH); COASTWIDTH=1; end if isempty(GRDX); GRDX=30; end if isempty(GRDY); GRDY=20; end global PRINTER if isempty(PRINTER); PRINTER=getenv('PRINTER'); end global RADUS RADIAN DEGREE OMEGA if isempty(RADUS); RADUS=6375000; end if isempty(RADIAN); RADIAN=pi / 180; end if isempty(DEGREE); DEGREE=180 / pi; end; if isempty(OMEGA); OMEGA = 2*pi/(24*3600); end; %-------------------------------------------------------------------- % As with other startup files, you may wish to add some global % variables to this file as you see fit.