Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

H5T.get_pad

Padding type of least and most-significant bits

Syntax

[lsb,msb] = H5T.get_pad(type_id)

Description

[lsb,msb] = H5T.get_pad(type_id) returns the padding type of the least and most-significant bit padding. type_id is a data type identifier. lsb is the least-significant bit padding type. msb is the most-significant bit padding type. Values for lsb and msb can be H5T_PAD_ZERO, H5T_PAD_ONE, or H5T_PAD_BACKGROUND.

Examples

 fid = H5F.open('example.h5');
 dset_id = H5D.open(fid,'/g3/integer');
 type_id = H5D.get_type(dset_id);
 [lsb,msb] = H5T.get_pad(type_id);
 switch(lsb)
     case H5ML.get_constant_value('H5T_PAD_ZERO')
         fprintf('lsb pad type is zeros\n');
     case H5ML.get_constant_value('H5T_PAD_ONE');
         fprintf('lsb pad type is ones\n');
     case H5ML.get_constant_value('H5T_PAD_BACKGROUND')
         fprintf('lsb pad type is background\n');
 end
 switch(msb)
     case H5ML.get_constant_value('H5T_PAD_ZERO')
         fprintf('msb pad type is zeros\n');
     case H5ML.get_constant_value('H5T_PAD_ONE');
         fprintf('msb pad type is ones\n');
     case H5ML.get_constant_value('H5T_PAD_BACKGROUND')
         fprintf('msb pad type is background\n');
 end

See Also

Was this topic helpful?