How to run script at startup of MATLAB

It is sometimes useful to run a MATLAB script when it is started. For example, to setup the environment just the way you want before you begin your work.

MATLAB supports this usage. When you start MATLAB from the shell, it looks for a startup.m script in the current directory and executes the commands in it after starting up. The directory from which MATLAB is started is called the MATLAB Startup Folder.

So, create a startup.m with the commands you need and run MATLAB from that directory.

Reference: startup

Tried with: MATLAB R2014a and Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s