netcdf.defGrp
Work with netCDF groups.
📝Syntax
grpid = netcdf.defGrp(ncid, name)
📥Input Arguments
Parameter Description
ncid Open netCDF file or group identifier.
grpid Group identifier.
name Group name.
📤Output Arguments
Parameter Description
grpid Return value described by the syntax shown above.
📄Description

netcdf.defGrp exposes group operations available in netCDF-4 files.

Groups organize dimensions, variables, and attributes into a hierarchy.

💡Examples
Copy-paste example for netcdf.defGrp.
filename = [tempdir(), 'help_netcdf_defGrp.nc'];
mode = bitor(netcdf.getConstant('NC_CLOBBER'), netcdf.getConstant('NC_NETCDF4'));
ncid = netcdf.create(filename, mode);
gid = netcdf.defGrp(ncid, 'science');
netcdf.close(ncid);
🔗See Also
netcdf.createnetcdf.defDimnetcdf.defVar
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub