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.

netcdf.defGrp

Create group in NetCDF file

Syntax

childGrpID = netcdf.defGrp(parentGroupId,childGroupName)

Description

childGrpID = netcdf.defGrp(parentGroupId,childGroupName) creates a child group with the name specified by childGroupName, that is the child of the parent group specified by parentGroupId

Input Arguments

parentGroupId

Identifier of NetCDF file, returned by netcdf.create or netcdf.open, or of a NetCDF group, returned by netcdf.defGrp.

childGroupName

Text string specifying the name that you want to assign to the group.

Output Arguments

childGrpID

Identifier of a NetCDF group.

Examples

This example creates a NetCDF dataset and then defines a group.

ncid = netcdf.create('myfile.nc','netcdf4');
childGroupId = netcdf.defGrp(ncid,'mygroup');
netcdf.close(ncid);

References

This function corresponds to the nc_def_grp function in the NetCDF library C API.

For copyright information, read the files netcdfcopyright.txt and mexnccopyright.txt.

Was this topic helpful?