FreeMat: ROOTPATH Set FreeMat Root Path

FreeMat

- Main Page
- Related Pages

ROOTPATH Set FreeMat Root Path

Section: FreeMat Functions

# Usage

In order to function properly, FreeMat needs to know where to find the `toolbox` directory as well as the `help` directory. These directories are located on what is known as the `root path`. Normally, FreeMat should know where these directories are located. However under some circumstances (usually when FreeMat is installed into a non-default location), it may be necessary to indicate a different root path location, or to specify a particular one. Note that on the Mac OS platform, FreeMat is installed as a bundle, and will use the toolbox that is installed in the bundle regardless of the setting for `rootpath`. For Linux, FreeMat will typically use `/usr/local/share/FreeMat-<Version>/` for the root path. Installations from source code will generally work, but binary installations (e.g., from an `RPM`) may need to have the rootpath set.

The `rootpath` function has two forms. The first form takes no arguments and returns the current root path

       rootpath

The second form will set a rootpath directly from the command line

       rootpath(path)

where `path` is the full path to where the `toolbox` and `help` directories are located. For example, `rootpath('/usr/share/FreeMat-4.0')`. The third form enables the GUI form

       rootpath gui

which activates a dialog box to pick a directory that is the root directory of the FreeMat installation (e.g., where `help` and `toolbox` are located. Changes to `rootpath` are persistent (you do not need to run it every time you start FreeMat).