matlab.io.fits.insertRows
Insert rows into table
Syntax
insertRows(fptr,firstrow,nrows)
Description
insertRows(fptr,firstrow,nrows)
inserts
rows into an ASCII or binary table. firstrow
is
a one-based number.
This function corresponds to the fits_insert_rows (ffirow)
function
in the CFITSIO library C API.
Examples
Insert five rows into an empty table.
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.insertRows(fptr,1,5); fits.closeFile(fptr); fitsdisp('myfile.fits','index',2);