why isfield does not work with tables, but fieldnames does?
8 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Roger Parkyn
il 15 Set 2015
Yes - it is something they have missed. Thank you for the work-around with: any(strcmp('a',fieldnames(t)))
Risposte (2)
the cyclist
il 16 Set 2015
That does seem inconsistent. It has the same behavior for dataset objects as well.
0 Commenti
Vedere anche
Categorie
Scopri di più su Structures in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!