# h5rm

Remove elements from an HDF5 file

## Calling Sequence

                h5rm(obj [, names])
                h5rm(filename, names)

## Arguments

obj

  a H5Object

names

  a matrix of strings giving the locations to remove

filename

  a string giving an the path of a HDF5 file

## Description

Remove one or more objects from the file.

## Examples

    a = h5open(TMPDIR + "/test.h5", "a");

    // We can create several groups under root
    names = "Group_" + string(1:10);
    h5group(a, names)

    // we display them
    h5ls(a)

    // ... or
    a.root.groups

    // we can remove a part of them
    names = "Group_" + string(1:2:10);
    h5rm(a, names);

    // we check that all is ok
    a.root.groups

    // We have finished so we free all the resources
    h5close(a);

    // We can remove attributes too
    x = %pi;
    save(TMPDIR + "/x.sod", "x"); // SOD files are HDF5 ones

    // Open the created file
    a = h5open(TMPDIR + "/x.sod");

    // we look for attributes
    h5ls(a)

    // ... or
    a.root.attributes

    // We remove 'SCILAB_sod_version'
    h5rm(a, "SCILAB_sod_version"), h5ls(a)

    // Free the resources
    h5close(a);

## See Also

- h5group
- h5dataset
- h5attr

## History

5.5.0
HDF5 module introduced.