Content Prev Next Down

Transferring Data from SigmaPlot to O-Matrix
Syntax spget(lefttoprightbottom)
See Also spitem , spput , spopen , spmacro

Returns data from the current SigmaPlot worksheet within the specified range. The arguments, left, top, right, and bottom must be integer scalars. The argument left specifies the first column, and the argument top specifies the first row. The argument right specifies the last column and bottom specifies the last row.

If all cells of the current worksheet within the specified range contain numbers, the spget function returns an NR by NC double-precision matrix. If the first cell in the specified range is text data, the range specified must be a vector.

Note: If you specify a range that is outside of the current worksheet, the SigmaPlot server will generate an exception. If retrieving numeric data, all cells within the specified must contain valid numeric data. If retrieving character data, all cells in the specified column must contain valid text data.


Retrieving Numeric Data
If SigmaPlot is not running and you enter the following at the O-Matrix prompt
   spitem("Data 1")
SigmaPlot will start and open the dataType.jnb sample file from the distribution. If you continue the example by entering
   I = spget(2,2,4,5)
   print I
O-Matrix will retrieve data from the Data 1 worksheet and respond
[ 2 , 2 , 2 ]
[ 3 , 3 , 3 ]
[ 4 , 4 , 4 ]
[ 5 , 5 , 5 ]
If you continue the example,
   spitem("Data 2")
O-Matrix will set Data 2 as the current worksheet, retrieve data from the specified range, and display
[ 6.28319 , 12.5664 , 18.8496 , 25.1327 ] 

Retrieving Character Data
If you continue the example above by entering
   spitem("Data 3")
O-Matrix will respond