What would be the function to create this new table ?
Afficher commentaires plus anciens
Hello there, my question is the following :
I have a table (let's say 20x2). I have duplicates on the first column but not on the second (for example the first 10 lines are x (each of these x have a their own value on the second column) and the 10 last lines are y (same logic).
With this function : Table2_grouped = varfun(@sum,Table2_bis,'InputVariables','second column','GroupingVariables','first column') I could regroup and cancel the duplicates and sum their own values. (I now have a 2x2 tables with x and y and their sums)
But here's my issue : i want now to create a new table where i once again have duplicates (so the 20 lines) but i want to keep the new value (meaning i want to keep to sum of the ten x and ten y). Hopefully this is clear and you can help me. thanks a lot
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!