Documentation Center

  • Trial Software
  • Product Updates

H5DS.set_scale

Convert dataset to dimension scale

Syntax

H5DS.set_scale(dataset_id,dim_name)

Description

H5DS.set_scale(dataset_id,dim_name) converts the dataset, dataset_id, to a dimension scale with name dim_name.

Examples

Create a dimension scale with name 'xdim'. The dataset has the name, 'x'.

fid = H5F.create('myfile.h5');
space_id = H5S.create_simple(1,10,10);
dtype = 'H5T_NATIVE_INT';
dcpl = 'H5P_DEFAULT';
dset_id = H5D.create(fid,'x',dtype,space_id,dcpl);
H5DS.set_scale(dset_id,'xdim');
H5S.close(space_id);
H5D.close(dset_id);
H5F.close(fid);

See Also

Was this topic helpful?