Basic Matlab Setup

Step 1

Log into portal and load the appropriate matlab and nstx/mdsplus modules.

Loading the modules will setup all of the basic paths and environment variables to access trees.

Step 2

Start up matlab

Step 3

The module load should have setup the path for matlab to access the mdsplus libraries.

Test that mdsplus and matlab are interacting by connecting to a tree and reading a simple value using a script or the command window, use the tree you are interested in.

The basic commands are
1) "mdsconnect('skylark.pppl.gov:8501::')" this will connect you to skylark.
2) "mdsopen('treename',shotnum)" this will open up a tree and specific shot.
3) "mdsvalue('node')" this will read the value of a basic node, which you can then store in a matlab variable.


If step three goes correctly then at this point matlab is setup and ready to read data from mdsplus trees.

Common Errors

If the tree fails to load or data is not coming back the two common issues for this are:

1. You do not have permission to read data from the tree, contact CODAC to resolve this.

2. The environment variable for the tree you are trying to access is not set up. Type "env" into the terminal window to see a list of variables and see if the tree path exists.




NSTX Home Page


Last modified 27-Aug-2015
For questions, contact Bill Davis