Borrar filtros
Borrar filtros

Make function reset for every interval/day

1 visualización (últimos 30 días)
Helena Hjørringgaard
Helena Hjørringgaard el 1 de Abr. de 2020
Editada: Helena Hjørringgaard el 1 de Abr. de 2020
Hello,
I'm trying to make a loop where I want my function to reset it's calculation for every day. My array is sectioned into minutes.
So far I've made an array containing all index for every values my function needs to do it's calculation for e.g.:
di = [1 1 1 2 2 2 3 3 3 ] which corresponds to the three first days for three minutes. So I have every number repeating 60*24 times. I've used the unique function for creating this.
I have another array called t which is simply just values from a previous calculation.
First I want a function x = t*2 and I want it to reset this for each day, so every time a value in di changes.
Then I want it to cummulate all values in x for each time di changes it's value (1,2,3 ect.).
I know some have asked for similar questions (sorry) , but I cannot get their solutions to work.
I'm using Matlab2019a.

Respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by