xtype = netcdf.defVlen(ncid, typeName, baseType)
| Parameter | Description |
|---|---|
| ncid | Open netCDF file or group identifier. |
| xtype | User-defined type identifier. |
| typeName | Name of the user-defined type. |
| baseType | Base netCDF datatype constant. |
| Parameter | Description |
|---|---|
| xtype | Return value described by the syntax shown above. |
netcdf.defVlen exposes user-defined type metadata from netCDF-4 files.
Variable length types require netCDF-4 support in the linked library.
filename = [tempdir(), 'help_netcdf_defVlen.nc'];
mode = bitor(netcdf.getConstant('NC_CLOBBER'), netcdf.getConstant('NC_NETCDF4'));
ncid = netcdf.create(filename, mode);
typeid = netcdf.defVlen(ncid, 'sample_vlen', netcdf.getConstant('NC_DOUBLE'));
netcdf.close(ncid);
| Version | Description |
|---|---|
| 2.0.0 | initial version |