Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

matlab.io.fits.readCol

Read rows of ASCII or binary table column

Syntax

[coldata,nullval] = readCol(fptr,colnum)
[coldata,nullval] = readCol(fptr,colnum,firstrow,numrows)

Description

[coldata,nullval] = readCol(fptr,colnum) reads an entire column from an ASCII or binary table column. nullval is a logical array specifying if a particular element of coldata should be treated as undefined. It is the same size as coldata.

[coldata,nullval] = readCol(fptr,colnum,firstrow,numrows) reads a subsection of rows from an ASCII or binary table column.

The MATLAB® data type returned by readCol corresponds to the data type returned by getEqColType.

This function corresponds to the fits_read_col (ffgcv) function in the CFITSIO library C API.

Examples

Read an entire column.

import matlab.io.*
fptr = fits.openFile('tst0012.fits');
fits.movAbsHDU(fptr,2);
colnum = fits.getColName(fptr,'flux');
fluxdata = fits.readCol(fptr,colnum);
fits.closeFile(fptr);

Read the first five rows in a column.

import matlab.io.*
fptr = fits.openFile('tst0012.fits');
fits.movAbsHDU(fptr,2);
colnum = fits.getColName(fptr,'flux');
fluxdata = fits.readCol(fptr,colnum,1,5);
fits.closeFile(fptr);

See Also

Was this topic helpful?