Trinh @ Bath

This is an old revision of the document!


Matlab startup file

Use a similar startup.m script below to set figure defaults. This ensures that axis labels are appropriately sized.

Run this command to open the startup file

edit(fullfile(userpath,'startup.m'))
 
	% Example startup file 
	
	% This adds all paths recursively from the directory
	addpath(genpath('~/myfunctions'));
	% This adds a single path
	addpath ~/mysinglepath/
	
	% Set figure default to something more pragmatic
	
	colordef white
	set(0, 'Units', 'pixels');
	
	set(0, 'defaultaxesfontsize', 18, 'defaultaxeslinewidth', 1, ...
	        'defaultlinelinewidth', 1, 'defaultpatchlinewidth', .7, ...
	        'defaultAxesFontSize', 18);
	
	
	set(0,'DefaultFigureColor','w', ...
	      'DefaultAxesColor','w',...
	      'DefaultAxesXColor','k',...
	      'DefaultAxesYColor','k',...
	      'DefaultAxesZColor','k',...
	      'DefaultTextColor','k',...
	      'DefaultLineColor','k');
	
	clear
	close all
	
	% Add the starting path
	cd ~/mystartingpath/