Borrar filtros
Borrar filtros

Averaging array, checking conditional, and increment average points.

1 visualización (últimos 30 días)
Daniel Koziel
Daniel Koziel el 25 de Sept. de 2019
Comentada: KALYAN ACHARJYA el 25 de Sept. de 2019
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 comentario
KALYAN ACHARJYA
KALYAN ACHARJYA el 25 de Sept. de 2019
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!

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by