Main Content

netcdf.inqUnlimDims

Return IDs of all visible unlimited dimensions in group

    Description

    unlimdimids = netcdf.inqUnlimDims(ncid) returns the IDs of all the visible unlimited dimensions in the file or group specified by ncid. If the file or group has no visible unlimited dimensions, the function returns an empty array.

    example

    Examples

    collapse all

    Open the sample netCDF file, and get the IDs of all the visible unlimited dimensions in the file. In this case, the file has no visible unlimited dimensions.

    ncid = netcdf.open("example.nc","NOWRITE");
    unlimdimids = netcdf.inqUnlimDims(ncid)
    
    unlimdimids =
    
         []
    

    Close the netCDF file.

    netcdf.close(ncid)
    

    Input Arguments

    collapse all

    NetCDF file or group identifier, specified as a nonnegative integer scalar. You can use the netcdf.create or netcdf.open function to return a file identifier. You can use the netcdf.defGrp function to return a group identifier.

    Data Types: double

    Tips

    • This function corresponds to the nc_inq_unlim_dims function in the netCDF library C API.

    Version History

    Introduced in R2010b