So I have a cell array with multiple tables and I am trying to access the first column name of the table.
c={'table1', 'table2', 'table3'}
Both of the following lines gives me the error:
fieldnames(c{1})(1)
fieldnames(c{1}){1}
Error: ()-indexing must appear last in an index expression.
But if I do following, it works:
fn=fieldnames(c{1})
fn{1}
Is there a way to do this with one line of code and can someone please explain the error?