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. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

Table column name


[colnum,colname] = getColNum(fptr,templt,casesen)


[colnum,colname] = getColNum(fptr,templt,casesen) gets the table column numbers and names of the columns whose names match an input template name. If casesen is true, then the column name match is case-sensitive. casesen defaults to false.

The input column name template may be either the exact name of the column to be searched for, or it may contain wildcard characters (*, ?, or #), or it may contain the integer number of the desired column (with the first column = 1). The '*' wildcard character matches any sequence of characters (including zero characters) and the '?' character matches any single character. The # wildcard matches any sequence of consecutive decimal digit characters (0-9).


Return all the columns starting with the letter 'C'.

fptr = fits.openFile('tst0012.fits');
[nums,names] = fits.getColName(fptr,'C*');
Was this topic helpful?