Sum values from one column vector based on another column vector
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Allison Sims
am 4 Jul. 2022
Kommentiert: Allison Sims
am 4 Jul. 2022
How do I compute this without using any loops or conditionals?
I want to sum the values in column B based on if the value in column A is a 1
So for example I want to add 34 and 28 only and save it to a new variable
A B
1 34
2 78
4 3
1 28
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!