This document describes a way to configure your CADLAB account to make it easier to work with MATLAB. There is no rocket science involved. It is also possible that alternative account configurations might be preferable.
The steps described below will help you with the following
You can also skip the rest of this web page and instead download a two page summary in PDF format.
Page 1: Creating the shortcut to MATLAB.
Page 2: Modifying the shortcut
so that MATLAB starts in N:\MATLAB
I have written several hundred MATLAB programs. Groups of programs are related to different tasks: data reduction and analysis, simulation of heat transfer or fluid flow, least squares curve fitting, photo manipulation, etc. To organize the MATLAB programs for these different projects, I keep each group of related programs in a separate directory.
I also have a handfull of MATLAB functions that I use in many different MATLAB projects. Two examples of these utility functions are
addpwd |
Add the current working directory to the path for this MATLAB session | |
thickLines |
Increase the line thickness and default font size for all subsequent plots. This is a preemptive action that allows you to save and then reduce the size of an image without causing the plot features to become too fine. |
I want to maintain only one copy of these functions, while at the same time I want to be able to use these functions in all my MATLAB programming projects. In other words I want to create a library (or toolbox) of functions that will always be accessible when I am doing work in MATLAB.
After you obtain programs for your library (i.e. after you have downloaded
the functions or written them yourself), you will need to store them in a directory.
I use a directory called MATLAB
in my "home" directory.
If you are a CECS student, your home is the directory you start in after
logging on to the CECS Windows Server.
Do not store all of your MATLAB files in your "MATLAB
" directory.
Rather, only put those files that are common to all uses of MATLAB there.
The most important file to put in this directory is
the pathdef.m
file that is created by the path browser (more
on this, below).
Here are the steps for creating a central MATLAB directory in your home directory.
N:
driveThe CECS Computer Action Team (CAT) configures the computers in the CADLAB to allow you to launch MATLAB from the Windows Start Menu. Using the Start Menu is workable, but it leaves starts your MATLAB session in a directory that you cannot use for storing files. This is confusing for new users, and it is an annoyance for experienced users. The solution is to create a desktop shortcut to MATLAB, and configure the shortcut so that MATLAB starts its session in a convenient directory.
The first step is to create a desktop shortcut. Once it is configured, you can double-click on the shortcut to launch MATLAB.
Figure 1: Creating a new desktop shortcut.
Figure 2: Completed specification of path to matlab.exe
in the New Shortcut Wizard.
Configure the shortcut so that when it launches MATLAB, it starts in your MATLAB directory, not the system directory for the MATLAB executable.