# Averaging data over array of cyclic values when cycle length is variable

4 visualizaciones (últimos 30 días)
Magrie B. el 16 de Feb. de 2023
Comentada: Matt J el 16 de Feb. de 2023
I have the following data
that I need to average over a cycle of length t = 1, from t = 5 to 10. Thus to obtain what an average cycle would look like.
What I did so far is that I found the index for t = 5, t = 6, t = 7, etc. So that I can form arrays as ke_56 = [Idx5:Idx6], ke_67 = [Idx6:Idx7], etc.
The main issue I am facing is that the cycles (e.g ke_56, ke_67, etc) do not contain the exact same amount of values. I could interpolate the shorter arrays to match the length of the longest one, but it's starting to be a teddious process. I am sure there is a simpler way to do all of what.
Note: I only have the basic student essentials version.
##### 1 comentarioMostrar -1 comentarios más antiguosOcultar -1 comentarios más antiguos
Matt J el 16 de Feb. de 2023
I am sure there is a simpler way
I don't think so.

Iniciar sesión para comentar.

### Categorías

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

R2022b

### Community Treasure Hunt

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

Start Hunting!

Translated by