matlab.io.fits.deleteHDU
Delete current HDU in FITS file
Syntax
hduType = matlab.io.fits.deleteHDU(fptr)
Description
hduType = matlab.io.fits.deleteHDU(fptr)
deletes the current HDU in a FITS file. Any
subsequent HDUs are shifted forward in the file,
filling the gap created by the deleted HDU. If you
delete the first HDU in the file (the
primary array), then the
function replaces the current primary array with a
null primary array containing the minimum set of
required keywords and no data. If there is an HDU
in the file that follows the deleted HDU, then the
function redefines the current HDU to be that
following HDU; if there is no such HDU, then the
function redefines the current HDU to be the HDU
that precedes the deleted HDU. The function
returns the type of the new current HDU.
Examples
Tips
This function corresponds to the
fits_delete_hdu(ffdhdu) function in the CFITSIO library C API.To use this function, you must be familiar with the CFITSIO C interface. You can access the CFITSIO documentation at the CFITSIO website.