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!

답변 (1개)

KSSV
KSSV 2022년 1월 20일

0 개 추천

idx = columnA > 600 ;
iwant = sum(columnB(idx)) ;

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

태그

질문:

2022년 1월 20일

답변:

2022년 1월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by