jcampread

Read JCAMP-DX formatted files

Syntax

JCAMPData = jcampread(File)

Description

JCAMP-DX is a file format for infrared, NMR, and mass spectrometry data from the Joint Committee on Atomic and Molecular Physical Data (JCAMP). jcampread supports reading data from files saved with Versions 4.24 and 5 of the JCAMP-DX format. For more details, see

http://www.jcamp.org/index.html

JCAMPData = jcampread(File)reads data from a JCAMP-DX formatted file (File) and creates a MATLAB structure (JCAMPData) containing the following fields:

Title
DataType
Origin
Owner
Blocks
Notes

The Blocks field of the structure is an array of structures corresponding to each set of data in the file. These structures have the following fields:

XData
YData
XUnits
YUnits
Notes

File is a JCAMP-DX formatted file (ASCII text file). Enter a filename, a path and filename, or a URL pointing to a file. File can also be a MATLAB character array that contains the text of a JCAMP-DX formatted file.

Examples

  1. Download test data in the file isa_ms1.dx from

    http://www.jcamp.org/testdata.html/testdata.zip
    
  2. Read a JCAMP-DX file (isas_ms1.dx) into MATLAB and plot the mass spectrum.

    jcampStruct = jcampread('isas_ms1.dx') 
    data = jcampStruct.Blocks(1); 
    stem(data.XData,data.YData, '.', 'MarkerEdgeColor','w');
    title(jcampStruct.Title); 
    xlabel(data.XUnits); 
    ylabel(data.YUnits);

    A figure window opens with the mass spectrum.

See Also

Bioinformatics Toolbox functions mslowess, mssgolay, msviewer


© 1994-2005 The MathWorks, Inc.