Error using cellfun: Input #3 expected to be a cell array, was char instead.
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Here is the line that errors out:
s = cellfun(@(x)(size(x,2)),T.pol,'UniformOuput', false);
Error using cellfun:
Input #3 expected to be a cell array, was char instead.
...but when I verify the class of T.pol...
class(T.pol)
ans =
cell
What am I missing?
Réponses (2)
Star Strider
le 16 Déc 2016
Guessing here, but while ‘T’ may be a cell, the ‘pol’ field could be a string.
One possibility to troubleshoot this is:
Tpol = T.pol;
then see what class ‘Tpol’ is.
0 commentaires
Voir également
Catégories
En savoir plus sur Structures dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!