Skip to content

Instantly share code, notes, and snippets.

@lgloege
Last active April 11, 2018 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgloege/b411a0e5d8469cf0149e4e1804a784eb to your computer and use it in GitHub Desktop.
Save lgloege/b411a0e5d8469cf0149e4e1804a784eb to your computer and use it in GitHub Desktop.
startup script for MATALB
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% STARTUP SCRIPT:
%
% This sets up the workspace.
% by adding path to scripts, and plot settings
%
% L. Gloege
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function startup()
% -- Add Paths
%%% root directory
pw = '~/Documents/MATLAB';
%%% Add path to these folders
addpath([pw '/scripts']);
addpath([pw '/scripts/m_map']);
addpath([pw '/scripts/air_sea']);
addpath([pw '/scripts/altmany-export_fig-5be2ca4']);
addpath([pw '/scripts/darren_fwpco2scripts']);
addpath([pw '/scripts/cbarrow']);
addpath([pw '/scripts/eof_toolbox']);
addpath([pw '/scripts/co2sys']);
addpath([pw '/scripts/hatchfill2']);
addpath([pw '/scripts/cmocean_v1.4']);
addpath([pw '/scripts/matlab_dan/dan_keep']);
addpath('/Users/lukegloege/Documents/MATLAB/scripts/vals_move_caribbean_scripts');
addpath('/Users/lukegloege/Documents/MATLAB/scripts/seawater');
% -- plot settings
set(0, 'DefaultAxesFontSize', 16); % - axes font size
set(0, 'DefaultTextFontSize', 14); % - text font size
set(0, 'DefaultFigurePosition', [650 550 500 400]); % - figure position
set(0, 'DefaultAxesFontName', 'Helvetica'); % - font name
set(0, 'defaultfigurecolor',[1 1 1]); % - background color
% -- command window setting
format compact
format short g
% -- clear workspace / screen
clear all; clc;
% -- display when log into MATLAB
disp('Startup complete!');
%%% Always land me in root directory (may not be necessary)
cd ~/Documents/MATLAB/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment