Contents Previous Next Subchapters

Reading SigmaPlot Data
Syntax spread(fileitem lefttoprightbottom)
See Also read , write , xlread

Returns data from a SigmaPlot worksheet in file file within the specified range. SigmaPlot must be installed and running when this function is called. The argument file must be a character row vector specifying the name of a SigmaPlot data file. The argument item must be a character row vector specifying the name of the data item to be read. 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.

If SigmaPlot is running and at the O-Matrix prompt you enter,
   file = [OM_INSTALL,"\example\IO\SplotSample.jnb"]
   spread(file, "RationalData", 1, 1, 4, 2)
O-Matrix will echo,
[ 3.14159 , 6.28319 , 9.42478 , 12.5664 ]
[ 6.28319 , 12.5664 , 18.8496 , 25.1327 ]