필터 지우기
필터 지우기

How to count only increases in data

조회 수: 3 (최근 30일)
Kyle Reagan
Kyle Reagan 2017년 7월 28일
편집: Kyle Reagan 2017년 7월 28일
I want to sum all the dramatic increases in my set of data, except for when an increase occurs at the same time the current increases. The items I want to sum are seen surrounded by green boxes, the ones that shouldn't be included in the sum are shown in red boxes. Please see the attached image. How should I go about doing this? My idea in pseudo code is "if rate of blue line > (arbitrary number) and if total increase of blue line > 2, and if current isn't increasing at same time, then add the increase of the blue line to the sum."

답변 (1개)

the cyclist
the cyclist 2017년 7월 28일
The way I would go about this is to do exactly what you've started doing. You need an algorithm, or set of rules/instructions for the procedure to follow. Begin writing English sentences that describe those rules. Then write some pseudocode that begins to get more quantitative about those rules. Then write the actual MATLAB that encodes them precisely.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by