PlotArrays:

-------------------------------------------------------------------------------
 Manage a set of arrays for plotting simulation data.
 Initialize the arrays, store plot points, then obtain arrays.
 The data is stored internally as multi-dimensional arrays, i.e.
   data(m,n,p,...,i,j,k)
 For a simple simulation, numberPts is just the size of the simulation
 loop, for example 100. If you are generating three runs of the same
 simulation you can pass in [3 100] instead.

 The log actions do not run checks for speed. If you attempt to log a
 variable that you have not added you will get an error.
-------------------------------------------------------------------------------
 Forms:
 d = PlotArrays( 'init', numberPts )
 d = PlotArrays( 'add', d, varName, x0 )
 d = PlotArrays( 'log', d, varName, index, value )
 d = PlotArrays( 'logmulti', d, {varNames}, index, {values} )
 x = PlotArrays( 'get', d, varName )
-------------------------------------------------------------------------------

 -------
 Inputs:
 -------
 action     (:)        String with the action name
 d         (1,1)       Structure from previous calls  
 varName    (:)        String with the variable name
 numberPts (1,k)       The dimensions of the simulation
 x0        (m,n,p,...) An example of the variable
 index     {1,k}       Indices of the data point in a cell array
 value     (m,n,p,...) Value to be stored

 --------
 Outputs:
 --------
 d           (.)       Data structure

-------------------------------------------------------------------------------