Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Adding values to an Flagged Event index in for loop

2 visualizzazioni (ultimi 30 giorni)
MustangManiac
MustangManiac il 27 Lug 2018
Chiuso: Stephen23 il 27 Lug 2018
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)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by