This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


(To be removed) Map resultset column name to resultset column index

namecolumn has been removed.


x = namecolumn(rset,n)


x = namecolumn(rset,n) maps a resultset column name n to its resultset column index. rset is the resultset and n is a character vector or cell array of character vectors containing the column names.


  1. Get the indices for the column names DNAME and LOC resultset object rset.

    x  =  namecolumn(rset, {'DNAME';'LOC'})
    x =
         2     3

    The results show that DNAME is column 2 and LOC is column 3.

  2. Get the index only for the LOC column.

    x  =  namecolumn(rset, 'LOC')

Introduced before R2006a

Was this topic helpful?