필터 지우기
필터 지우기

Averaging array, checking conditional, and increment average points.

조회 수: 1 (최근 30일)
Daniel Koziel
Daniel Koziel 2019년 9월 25일
댓글: KALYAN ACHARJYA 2019년 9월 25일
I am attempting to solve the following issue that I wrote in a step sequence:
1 - I have an array of 250 points and I want to take the average of the 1st 10 points.
2 - If the 11th point in the 250 point array is 1.25x bigger than the average -----> I want to look at the 12th point in the array to see if this value is larger than the 11th point (and so on).
2b - If the next point is no longer larger, I want to save the maximum point.
3 - If the next point outside of the 10 point average is not 1.25x bigger, I want to remove the first point of the average, and add the next point in the array:
Ex. 1st average (1 through 10) ----> check 11th point to see if 1.25x bigger ----> no: average (2 through 11) ----> check 12th point to see if 1.25x larger ----> yes: check 13th point to see if greater than or equal to 12th point ------> yes: check 14th point to see if greater than or equal to 13th point ----> no: store 13th point.
Once the maximum point is found, restart the array averaging at the maximum point.
I am new to Matlab and struggling with this issue.
Thank you!
  댓글 수: 1
KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 9월 25일
Check here, suggested you to try yourself,it's easy, I am sure, you can. Any issue we are here to help you.
Good Luck!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by