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.

matlab.io.fits.deleteFile

Delete FITS file

Syntax

deleteFile(fptr)

Description

deleteFile(fptr) closes and deletes an open FITS file. This can be useful if a FITS file cannot be properly closed.

This function corresponds to the fits_delete_file (ffdelt) function in the CFITSIO library C API.

Examples

import matlab.io.*
srcFile = fullfile(matlabroot,'toolbox','matlab','demos','tst0012.fits');
copyfile(srcFile,'myfile.fits');
fileattrib('myfile.fits','+w');
fptr = fits.openFile('myfile.fits','readwrite');
fits.deleteFile(fptr);
fptrs = fits.getOpenFiles()
Was this topic helpful?