Contenido principal

matlab.io.fits.getNumRows

Get number of rows in table

Syntax

nrows = matlab.io.fits.getNumRows(fptr)

Description

nrows = matlab.io.fits.getNumRows(fptr) returns the number of rows in the current FITS table.

Examples

collapse all

Open a sample FITS file that has a table in the second HDU. Get the number of rows in the table.

import matlab.io.*
fptr = fits.openFile("tst0012.fits");
fits.movAbsHDU(fptr,2);
nrows = fits.getNumRows(fptr)
nrows = 
11
fits.closeFile(fptr)

Tips

  • This function corresponds to the fits_get_num_rowsll (ffgnrwll) function in the CFITSIO library C API.

  • To use this function, you must be familiar with the CFITSIO C interface. You can access the CFITSIO documentation at the CFITSIO website.

Extended Capabilities

expand all

Version History

expand all