Main Content

matlab.io.fits.writeHistory

Write or append HISTORY keyword to CHU

Syntax

writeHistory(fptr,history)

Description

writeHistory(fptr,history) writes (appends) a HISTORY keyword to the CHU. The history keyword, specified as a character vector or string scalar, is continued over multiple keywords if it is longer than 70 characters.

This function corresponds to the fits_write_history (ffphis) function in the CFITSIO library C API.

Examples

import matlab.io.*
fptr = fits.createFile('myfile.fits');
fits.createImg(fptr,'byte_img',[100 200]);
fits.writeHistory(fptr,'this is a history keyword');
fits.closeFile(fptr);
fitsdisp('myfile.fits','mode','full');