(function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); skip to primary navigationskip to content
 

MATLAB Startup

When MATLAB starts up, it looks for a file called startup.m in the directory matlab under your home directory.

Typing cd at the shell prompt always returns you to your home directory.

The file startup.m contains matlab script statements. Matlab reads and executes these when it starts up. Typically you'd use this to set the preferred path to programs run from within Matlab, like spm.

A simple startup.m script might contain the following:

%______________________________________________________
v = version;
if v(1)=='6', path('/usr/local/spm2/',path); end;
%______________________________________________________