Read data from SPC file
SPCStruct = tgspcread(File)
tgspcread(..., 'ZRange', ZRangeValue,
...)
tgspcread(..., 'ScanIndices', ScanIndicesValue,
...)
tgspcread(..., 'Verbose', VerboseValue,
...)
reads
a Galactic SPC file from Thermo Scientific®, and returns the data
in a MATLAB® structure.SPCStruct = tgspcread(File)
tgspcread(..., ' calls PropertyName', PropertyValue,
...)tgspcread with optional properties
that use property name/property value pairs. You can specify one or
more properties in any order. Enclose each PropertyName in
single quotation marks. Each PropertyName is
case insensitive. These property name/property value pairs are as
follows:
tgspcread(..., 'ZRange', specifies a range of z data values
in the SPC file from which to extract scans. ZRangeValue,
...)
tgspcread(..., 'ScanIndices', specifies a scan, multiple scans, or range of scans
in the SPC file to read. ScanIndicesValue,
...)
tgspcread(..., 'Verbose',
controls the display of the progress of the reading of the SPC file. Choices are
VerboseValue,
...)true (default) or false.
|
Character vector or string specifying a file name or path and file name of an SPC file that conforms to the Thermo Scientific Universal Data Format Specification. If you specify only a file name, that file must be on the MATLAB search path or in the current folder. |
|
Two-element numeric array Tip For summary information about the z data
values in an SPC file, use the Note If you specify a |
|
Positive integer, vector of integers, or a two-element numeric
array Tip For summary information about the scan indices in an SPC file,
check the Note If you specify a |
|
Controls the display of the progress of the reading of |
|
Structure containing information from an SPC file. The structure contains the following fields.
|
This example assumes that you already have an SPC file to use. sample.spc file
is not provided with the Bioinformatics Toolbox™ software.
Read an SPC file:
% Read the contents of an SPC file into a MATLAB structure
out = tgspcread('results.spc')
File contains 1 scans
out =
Header: [1x1 struct]
X: [12031x1 single]
Y: [12031x1 double]
Z: 0Plot an SPC file:
% Plot the first scan in the SPC file: plot(out.X,out.Y(:,1));
datenum | jcampread | mzcdf2peaks | mzcdfinfo | mzcdfread | mzxml2peaks | mzxmlinfo | mzxmlread | tgspcinfo