Main Content

matlab.io.hdf4.sd.isRecord

Namespace: matlab.io.hdf4.sd

Determine if dataset is appendable

Syntax

TF = isRecord(sdsID)

Description

TF = isRecord(sdsID) determines if the dataset specified by sdsID is appendable, meaning that the slowest changing dimension is unlimited.

This function corresponds to the SDisrecord function in the HDF library C API.

Examples

import matlab.io.hdf4.*
sdID = sd.start('sd.hdf');
ndataset = sd.fileInfo(sdID);
for idx = 0:ndataset-1
    sdsID = sd.select(sdID,idx);
    sdsName = sd.getInfo(sdsID);
    if sd.isRecord(sdsID)
        fprintf('%s is a record variable.\n',sdsName);
    else
        fprintf('%s is not a record variable.\n',sdsName);
    end
    sd.endAccess(sdsID);
end
sd.close(sdID);