Main Content

matlab.io.fits.fileMode

Get I/O mode of FITS file

Syntax

fmode = matlab.io.fits.fileMode(fptr)

Description

fmode = matlab.io.fits.fileMode(fptr) returns the I/O mode of an open FITS file. The function returns fmode as either 'READONLY' or 'READWRITE'.

Examples

collapse all

import matlab.io.*
fptr = fits.openFile("tst0012.fits");
fmode = fits.fileMode(fptr)
fmode = 
'READONLY'
fits.closeFile(fptr)

Tips

  • This function corresponds to the fits_file_mode (ffflmd) 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.

Extended Capabilities

expand all

Version History

expand all