How to sum the second position data in an array (50000x2) with the same value in the first position
Mostrar comentarios más antiguos
Hello everyone im having some issues trying to solve this. I have an array with this form
A=
2.79314 0.007
2.79314 0.083
2.79314 0.051
2.91205 0.06
2.91205 0.06
2.97143 0.08
2.97143 0.06
2.97143 0.07
2.97143 0.08
What i want is that whenever the data of the first column is the same, sum the data in the second column.This is what I want to obtain:
B=
2.79314 (0.007+0.083+0.051)
2.91205 (0.06+0.06+0.08)
2.97143 (0.08+0.06+0.07+0.08)
Thnak you very much in advance.
Regards.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!