Quantcast

Documentation Center

  • Trial Software
  • Product Updates

matlab.io.fits.createFile

Create FITS file

Syntax

fptr = createFile(filename)

Description

fptr = createFile(filename) creates a FITS file. An error will be returned if the specified file already exists, unless the filename is prefixed with an exclamation point (!). In that case CFITSIO will overwrite (delete) any existing file with the same name.

This function corresponds to the fits_create_file (ffinit) function in the CFITSIO library C API.

Examples

Create a new FITS file, overwriting any existing file by the same name.

import matlab.io.*
fptr = fits.createFile('myfile.fits');
fits.createImg(fptr,'uint8',[256 512]);
fits.closeFile(fptr);
fitsdisp('myfile.fits');

See Also

| | |

Was this topic helpful?