Azzera filtri
Azzera filtri

Adding values to an Flagged Event index in for loop

1 visualizzazione (ultimi 30 giorni)
Hi - Basic question but I'm trying to create event flags in a loop. So each time an event occurs it iterates my variable. this is an example I just wrote, but basically I have a large For loop that will loop DataSet (i) thousands of times. However when it's in an 'event state' I want to iterate my EventTotal(k) + 1, then keep adding the values of my DataSet(i) until the event is over. Then the next Event would iterate my EventTotal again and repeat the process
if true
for (i = 100)
if (EvenFlag = True)
k = k + 1;
EventTotal(k) = DataSet (i) + EventTotal (k)
end

Risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by