matlab.io.fits.insertCol
Insert column into table
Syntax
insertCol(fptr,colnum,ttype,tform)
Description
insertCol(fptr,colnum,ttype,tform)
inserts a column into an ASCII or
binary table. Specify ttype
and tform
as character
vectors or string scalars.
This function corresponds to the fits_insert_col (fficol)
function
in the CFITSIO library C API.
Examples
import matlab.io.* fptr = fits.createFile('myfile.fits'); ttype = {'Col1','Col2'}; tform = {'3A','1D'}; tunit = {'m/s','candela'}; fits.createTbl(fptr,'binary',0,ttype,tform,tunit,'my-table'); fits.insertCol(fptr,3,'Col3','3D'); fits.closeFile(fptr); fitsdisp('myfile.fits','index',2);