Main Content

matlab.io.fits.getEqColType

Get column data type, repeat value, and width

Syntax

[dtype,repeat,width] = matlab.io.fits.getEqColType(fptr,colnum)

Description

[dtype,repeat,width] = matlab.io.fits.getEqColType(fptr,colnum) returns the equivalent data type needed to store the scaled column data type, the vector repeat value, and the width in bytes of a column in an ASCII or binary table.

Examples

collapse all

Open a sample FITS file that has a table in the second HDU. Get information about the fifth column of the table. Then close the file.

import matlab.io.*
fptr = fits.openFile("tst0012.fits");
fits.movAbsHDU(fptr,2);
[dtype,repeat,width] = fits.getEqColType(fptr,5)
dtype = 
'TFLOAT'
repeat = 
3
width = 
4
fits.closeFile(fptr)

Tips

  • This function corresponds to the fits_get_eqcoltype (ffeqty) 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