Main Content

matlab.io.fits.fileName

Get name of FITS file

Syntax

name = matlab.io.fits.fileName(fptr)

Description

name = matlab.io.fits.fileName(fptr) returns the full path and name of the FITS file associated with the specified file pointer.

Examples

collapse all

import matlab.io.*
fptr = fits.openFile("tst0012.fits","READONLY");
nameWithPath = fits.fileName(fptr);
[~,name,ext] = fileparts(nameWithPath);
fprintf("%s%s",name,ext)
tst0012.fits
fits.closeFile(fptr)

Tips

  • This function corresponds to the fits_file_name (ffflnm) 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