This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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);