Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
24
Добавлен:
09.02.2015
Размер:
673.28 Кб
Скачать

Values for 'Interpolate' are: lon, lat

LON and LAT are numbers specifying a latitude/longitude

points for bilinear interpolation.

References:

Example: Read data set named 'Example SDS'.

data1 = hdfread('example.hdf','Example SDS');

Example: Read data from HDF-EOS global grid field 'TbOceanRain'.

data = hdfread('example.hdf','MonthlyRain','Fields','TbOceanRain');

Example: Read data for the northern hemisphere for the same field.

data = hdfread('example.hdf','MonthlyRain', ...

'Fields','TbOceanRain', ...

'Box', {[0 360], [0 90]});

Example: Retrieve info about example.hdf.

fileinfo = hdfinfo('example.hdf');

% Retrieve info about Scientific Data Set in example.hdf

data_set_info = fileinfo.SDS;

% Check the size

data_set_info.Dims.Size

% Read a subset of the data using info structure

data2 = hdfread(data_set_info, 'Index',{[3 3],[],[10 2 ]});

Example: Access data in Fields of Vdata.

s = hdfinfo('example.hdf')

data3 = hdfread(s.Vdata, 'Fields', {'Idx', 'Temp', 'Dewpt'})

data3{1}

data3{2}

data3{3}

Please read the file hdf4copyright.txt for more information.

See also hdftool, hdfinfo, hdf.

Reference page in Help browser

doc hdfread

<hdftool> - Browse and import from HDF4 or HDF-EOS files.

HDFTOOL Browse and import data from HDF or HDF-EOS files

HDFTOOL is a graphical user interface to browse the contents of HDF

and HDF-EOS files and import data and subsets of data.

HDFTOOL starts the HDF import tool.

HDFTOOL(FILENAME) opens the HDF or HDF-EOS file FILENAME in the

HDFTOOL.

H = HDFTOOL(...) returns a handle H to the tool. CLOSE(H)

will close the tool from the command line.

Multiple files may be opened in HDFTOOL, by selecting Open from the

File menu.

Example

-------

hdftool('example.hdf');

Please read the file hdf4copyright.txt for more information.

See also hdfinfo, hdfread, hdf, uiimport.

Reference page in Help browser

doc hdftool

HDF version 5 file handling

<hdf5info> - Get information about an HDF5 file.

HDF5INFO Get information about an HDF5 file.

FILEINFO = HDF5INFO(FILENAME) returns a structure whose fields contain

information about the contents of an HDF5 file. FILENAME is a

string that specifies the name of the HDF file.

FILEINFO = HDF5INFO(..., 'ReadAttributes', BOOL) allows the user to

specify whether or not to read in the values of the attributes in

the HDF5 file. The default value for BOOL is true.

[...] = HDF5INFO(..., 'V71Dimensions', BOOL) specifies whether to

report the dimensions of datasets and attributes as given in earlier

versions of HDF5INFO (MATLAB 7.1 [R14SP3] and earlier). If BOOL is

true, the first two dimensions are swapped to imply a change in

majority. This behavior may not correctly reflect the intent of the

data, but it is consistent with HDF5READ when it is also given the

'V71Dimensions' parameter. When BOOL is false (the default), the

data dimensions correctly reflect the data ordering as it is written

in the file. Each dimension in the output variable matches the same

dimension in the file.

Please read the file hdf5copyright.txt for more information.

Example:

info = hdf5info('example.h5');

See also hdf5read, hdf5write, hdf5.

Reference page in Help browser

doc hdf5info

<hdf5read> - Read datasets and attributes from an HDF5 file.

HDF5READ Reads data from HDF5 files.

HDF5READ reads data from a data set in an HDF5 file. If the

name of the data set is known, then HDF5READ will search the file

for the data. Otherwise, use HDF5INFO to obtain a structure

describing the contents of the file. The fields of the structure

returned by HDF5INFO are structures describing the data sets

contained in the file. A structure describing a data set may be

extracted and passed directly to HDF5READ. These options are

described in detail below.

DATA = HDF5READ(FILENAME,DATASETNAME) returns in the variable DATA

all data from the file FILENAME for the data set named DATASETNAME.

DATA = HDF5READ(FILENAME,LOCATION,ATTRIBUTENAME) returns in the

variable DATA all data from the file FILENAME for the attribute named

ATTRIBUTENAME attached to the location provided in LOCATION. Location

can be either a dataset or a group.

DATA = HDF5READ(HINFO) returns in the variable DATA all data from the

file for the particular data set described by HINFO. HINFO is a

structure extracted from the output structure of HDF5INFO (see example).

[DATA, ATTR] = HDF5READ(..., 'ReadAttributes', BOOL) returns the

data information for the data set as well as the associated attribute

information contained within that data set. By default, BOOL is

false.

[...] = HDF5READ(..., 'V71Dimensions', BOOL) specifies whether to

change the majority of datasets. If BOOL is true, the first two

dimensions of the dataset are permuted. This behavior may not

correctly reflect the intent of the data and may invalidate metadata,

but it is consistent with previous versions of HDF5READ (MATLAB 7.1

[R14SP3] and earlier). When BOOL is false (the default), the data

dimensions correctly reflect the data ordering as it is written in

the file. Each dimension in the output variable matches the same

dimension in the file.

HDF5READ performs best on numeric datasets. It is strongly recommended

that you use the low-level HDF5 interface when reading string, compound,

or variable length datasets. To read a subset of a dataset, you must

use the low-level interface.

Example:

% Read a dataset based on an HDF5INFO structure.

info = hdf5info('example.h5');

dset = hdf5read(info.GroupHierarchy.Groups(2).Datasets(1));

Please read the file hdf5copyright.txt for more information.

See also hdf5info, hdf5write, hdf5, H5D.read.

Reference page in Help browser

doc hdf5read

<hdf5write> - Write datasets and attributes to an HDF5 file.

HDF5WRITE Write a Hierarchical Data Format version 5 file.

HDF5WRITE(FILENAME, LOCATION, DATASET) adds the data in DATASET to

the HDF5 file named FILENAME. LOCATION defines where to write the

DATASET in the file and resembles a Unix-style path. The data in

DATASET is mapped to HDF5 datatypes using the rules below.

HDF5WRITE(FILENAME, DETAILS, DATASET) adds the DATASET to FILENAME

using the values in the DETAILS structure, which can contain the

following fields for a dataset:

Location The location of the dataset in the file (char array).

Name A name to attach to the dataset (char array).

HDF5WRITE(FILENAME, DETAILS, ATTRIBUTE) adds the metadata ATTRIBUTE

to FILENAME using the values in the DETAILS structure. For

attributes the following fields are required:

AttachedTo The location of the object this attribute modifies.

AttachType A string that identifies what kind of object this

attribute modifies. Possible values are 'group'

and 'dataset'.

Name A name to attach to the dataset (char array).

HDF5WRITE(FILENAME, DETAILS1, DATASET1, DETAILS2, ATTRIBUTE1, ...)

provides a mechanism for writing multiple datasets and/or attributes

to FILENAME in one operation. Each dataset and attribute must have

a DETAILS structure.

HDF5WRITE(FILENAME, ... , 'WriteMode', MODE, ...) specifies whether

writing to an existing file overwrites it (the default) or appends

datasets and attributes to the existing file. Possible values for

MODE are 'overwrite' and 'append'.

HDF5WRITE(FILENAME, ... , 'V71Dimensions', BOOL, ...) specifies

whether to change the majority of datasets. If BOOL is true, the

first two dimensions of each dataset are permuted. This behavior

may not correctly reflect the intent of the data and may invalidate

metadata, but it is consistent with previous versions of HDF5WRITE

(MATLAB 7.1 [R14SP3] and earlier). When BOOL is false (the

default), the data dimensions correctly reflect the data ordering as

Соседние файлы в папке Библиотеки Matlab