Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

hdfh

Gateway to HDF H interface

Syntax

[out1,...,outN] = hdfh(funcstr,input1,...,inputN)

Description

hdfh is the MATLAB® gateway to the HDF H interface.

[out1,...,outN] = hdfh(funcstr,input1,...,inputN) returns one or more outputs corresponding to the H function in the HDF library specified by functstr.

There is a one-to-one correspondence between H functions in the HDF library and valid values for funcstr. For example, hdfh('close',file_id) corresponds to the C library call Hclose(file_id).

Functions

Value of funcstrFunction SyntaxDescription
'appendable'

status = hdfh('appendable',access_id)

Specifies that the element can be appended to.
'close'

status = hdfh('close',file_id)

Closes the access path to the file.
'deldd'

status = hdfh('deldd',file_id,tag,ref)

Deletes a tag and reference number from the data descriptor list.
'dupdd'

status = hdfh('dupdd',file_id,tag,ref,old_tag,old_ref)

 
'endaccess'

status = hdfh('endaccess',access_id)

Terminates access to a data object by disposing of the access identifier.
'fidinquire'

[filename,access_mode,attach,status] = hdfh('fidinquire',file_id)

Returns information about specified file.
'find'

[tag,ref,offset,length,status] = hdfh('find',file_id,... search_tag,search_ref,search_type,dir)

Locates the next object to be searched for in an HDF file. search_type can be 'new' or 'continue'. The dir input can be 'forward' or 'backward'.
'getelement'

[data,status] = hdfh('getelement',file_id,tag,ref)

Reads the data element for the specified tag and reference number.
'getfileversion'

[major,minor,release,info,status] = hdfh('getfileversion',file_id)

Returns version information for an HDF file.
'getlibversion'

[major,minor,release,info,status] = hdfh('getlibversion')

Returns version information for the current HDF library.
'inquire'

[file_id,tag,ref,length,offset,position,access,...
special,status] = hdfh('inquire',access_id)

Returns access information about a data element.
'ishdf'

tf = hdfh('ishdf',filename)

Determines if a file is an HDF file.
'length'

length = hdfh('length',file_id,tag,ref)

Returns the length of a data object specified by the tag and reference number.
'newref'

ref = hdfh('newref',file_id)

Returns a reference number that can be used with any tag to product a unique tag/reference number pair.
'nextread'

status = hdfh('nextread',access_id,tag,ref,origin)

Searches for the next data descriptor that matches the specified tag and reference number. origin can be 'start' or 'current'.
'number'

num = hdfh('number',file_id,tag)

Returns the number of instances of a tag in a file.
'offset'

offset = hdfh('offset',file_id,tag,ref)

Returns the offset of a data element in the file.
'open'

file_id = hdfh('open',filename,access,n_dds)

Provides an access path to an HDF file by reading all the data descriptor blocks into memory.
'putelement'

count = hdfh('putelement',file_id,tag,ref,X)

Writes a data element or replaces an existing data element in an HDF file. X must be a uint8 array.
'read'

X = hdfh('read',access_id,length)

Reads the next segment in a data element.
'seek'

status = hdfh('seek',access_id,offset,origin)

Sets the access pointer to an offset within a data element. origin can be 'start' or 'current'.
'startread'

access_id = hdfh('startread',file_id,tag,ref)

 
'startwrite'

access_id = hdfh('startwrite',file_id,tag,ref,length)

 
'sync'

status = hdfh('sync',file_id)

 
'trunc'

length = hdfh('trunc',access_id,trunc_len)

Truncates the specified data object to the given length.
'write'

count = hdfh('write',access_id,X)

Writes the next data segment to a specified data element. X must be a uint8 array.

Output Arguments

A status or identifier output of -1 indicates that the operation failed.

Limitations

  • hdfh does not support these functions in the NCSA H interface:

    • Hcache

    • Hendbitaccess

    • Hexist

    • Hflushdd

    • Hgetbit

    • Hputbit

    • Hsetlength

    • Hshutdown

    • Htagnewref

Introduced before R2006a

Was this topic helpful?