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.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.

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