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

Delete rows from table

Syntax

deleteRows(fptr,firstrow,nrows)

Description

deleteRows(fptr,firstrow,nrows) deletes rows from an ASCII or binary table.

This function corresponds to the fits_delete_rows (ffdrow) function in the CFITSIO library C API.

Examples

Delete the second, third, and fourth rows in a binary table (second HDU).

import matlab.io.*
srcFile = fullfile(matlabroot,'toolbox','matlab','demos','tst0012.fits');
copyfile(srcFile,'myfile.fits');
fileattrib('myfile.fits','+w');
fprintf('Before:  '); fitsdisp('myfile.fits','index',2,'mode','min');
fptr = fits.openFile('myfile.fits','readwrite');
fits.movAbsHDU(fptr,2);
fits.deleteRows(fptr,2,2);
fits.closeFile(fptr);
fprintf('After :  '); fitsdisp('myfile.fits','index',2,'mode','min');