Using ShapeTools from Matlab
Frequently Asked Questions
How do I install the ShapeTools library so that Matlab can see it ?*
For Unix machines
Add the following line to the Loni Matlab
config file $MATLAB_HOME/toolbox/local/classpath.txt
"path_to_shape_tools_jar/ShapeTools.jar"
$MATLAB_HOME is the directory in which Matlab is installed,
and "path_to_shape_tools_jar" is the directory in which you store
the java Jar file containing the ShapeTools library.
Once you have done this, and restarted Matlab, you should have access
to the ShapeTools library classes. You can test this by typing the
following line into your Matlab command window:
import edu.ucla.loni.ccb.shape.Shape;
If Matlab can find the ShapeTools library you'll
get a prompt for the next command, if not, Matlab will
respond with something like this:
??? Error using ==> import
Arguments to IMPORT must either end with '.*' or else specify
a fully qualified class name: edu.ucla.loni.ccb.shape.Shape.
For MS Windows
Here is how to add ShapeTools to Matlab running on an MS Windows machine
*1. Find classpath.
Type "which classpath.txt". It will return location of default classpath.txt.
- 2. Locate and copy
Go to the directory where classpath.txt is, and copy classpath.txt to your own startup directory.
- 3. Check
Close Matlab and restart it.
Type "which classpath.txt". This time make sure that it returns directory of classpath.txt you have copied.
- 4. Edit
Type "edit classpath.txt". Add class path of your application. For example:
$matlabroot/java/jar/ShapeTools.jar