Netcdfreadr
Jump to navigation
Jump to search
Purpose
Reads in netCDF files and outputs a DataSet and or structure.
Synopsis
- x = netcdfreadr(filenames, options);
Description
If no file is given (filenames) then prompts user for filename/s. Default options are set to handle Mass Spectroscopy exported data.
NOTE: This function uses netCDF Library Functions available in Matlab 2009a and newer.
Inputs
- filename = a text string with the name of a spectral file or a cell of strings of filenames.
- If filename is omitted or blank, the user will be prompted to select a file graphically.
- If filename is an empty cell {}, the user will be prompted to select a folder and then one or more AIT files in the identified folder.
Outputs
- x = takes one of 3 forms:
- rawdata : Genereic structure of all data.
- .varname = variable name.
- .xtype = variable datatype.
- .varDimsIDs = dimensions IDs.
- .varAtts = number of attributes.
- .varID = variable ID.
- .data = variable data.
- .attributes(j).attname = attribute name.
- .attributes(j).attval = attribute value.
- datastruct : Structure of data with variable names as field names.
- dso : Dataset Object (only when .getms = yes).
- rawdata : Genereic structure of all data.
Options
options = a structure array with the following fields:
- output : [ { 'dso' } | 'rawdata' | 'datastruct' | 'all'] What output to pass.
- getms : [ { 'yes' } | 'no' ] Get Mass Spec dataset from file.
- massoffset : [ 0 ] Shift point for round-off (when using .getms).
- chunksize : [ 1.5 ] Divide data into chunks of chunksize*1,000,000 elements when contructing a MS dataset. Value of 1.5 million is good default for 32bit systems.
See Also
Data Importing Formats, asdreadr, asfreadr, fluoromaxreadr, gwscanreadr, hjyreadr, jcampreadr, opusreadr, pdfreadr, pereadr, spareadr, spcreadr, writeasf, xclreadr