I have a grid of cells and I want to get the average value of cells in the 7th column.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am new to Matlab. Here is what I am doing:
% mean(name_of_table(:,7))
but I get the error
% Undefined function 'sum' for input arguments of type 'cell'.
What's wrong?
0 commentaires
Réponses (2)
Walter Roberson
le 20 Fév 2016
mean(cell2mat(name_of_table(:,7))
Note: this will not work if "name_of_table" is referring to a table() data structure rather than to a cell array like in your question heading.
0 commentaires
Voir également
Catégories
En savoir plus sur Tables 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!