23.12.2012 Views

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

MATLAB Function Reference Volume 1: A - E - Bad Request

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

cdfread<br />

2cdfread<br />

Purpose Read data from a CDF file<br />

Syntax data = cdfread(file)<br />

data = cdfread(file, 'records', recnum, ...)<br />

data = cdfread(file, 'variables', varnames, ...)<br />

data = cdfread(file, 'slices', dimensionvalues, ...)<br />

[data, inf0] = cdfread(file, ...)<br />

Description data = cdfread(file) reads all of the variables from each record of the<br />

Common Data Format (CDF) file specified in the string, file. The function<br />

returns a cell array, in which each row contains a record and each column<br />

represents a variable.<br />

2-224<br />

data = cdfread(file, 'records', recnums, ...) reads only those records<br />

specified in the vector, recnums. The record numbers are zero-based. The<br />

function returns a cell array having length(recnums) number of rows and as<br />

many columns as there are variables.<br />

data = cdfread(file, 'variables', varnames, ...) reads only those<br />

variables specified in the 1-by-N or N-by-1 cell array of strings, varnames. Data<br />

is returned in a cell array having length(varnames) number of columns and a<br />

row for each record requested.<br />

data = cdfread(file, 'slices', dimensionvalues, ...) reads specific<br />

values from the records of one variable in the CDF file. The N-by-3 matrix,<br />

dimensionvalues, indicates which records are to be read by specifying start,<br />

interval, and count parameters for each of the N dimensions of the variable.<br />

The start parameter is zero-based.<br />

The number of rows in dimensionvalues must be less than or equal to the<br />

number dimensions of the variable. Unspecified rows default to [0 1 M], where<br />

M is the total number of values in a record. This causes cdfread to read every<br />

value from those dimensions.<br />

Because you can read just one variable at a time, you must also include a<br />

'variables' parameter with this syntax.<br />

[data, inf0] = cdfread(file, ...) also returns details about the CDF file<br />

in the info structure.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!