why isfield does not work with tables, but fieldnames does?

in 2014a
Example:
>> istable(t)
ans =
1
>> t
t =
a b c
_ _ _
1 2 3
>> isfield(t,'a')
ans =
0
>> any(strcmp('a',fieldnames(t)))
ans =
1

1 comentario

Yes - it is something they have missed. Thank you for the work-around with: any(strcmp('a',fieldnames(t)))

Iniciar sesión para comentar.

Categorías

Productos

Preguntada:

el 26 de Mzo. de 2014

Respondida:

el 16 de Sept. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by