data of corresponding column

1 visualización (últimos 30 días)
farhah muhammad
farhah muhammad el 20 de En. de 2022
Respondida: KSSV el 20 de En. de 2022
HI,
I have many columns, I need to find corresponding data between two columns and summation from one column based on the condition of another column .
for example, the column A should be more than 600, then sum of the column B (based on the conditions in column A- more than 600).
thank you! really hope someone can help me out from this!

Respuestas (1)

KSSV
KSSV el 20 de En. de 2022
idx = columnA > 600 ;
iwant = sum(columnB(idx)) ;

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by