Azzera filtri
Azzera filtri

Creating a variable that changes with the for loop counter

2 visualizzazioni (ultimi 30 giorni)
Hi,
I have a for loop that counts up from 1 to 36, with "x" being that counter variable. In this loop I have a few calculations,
Mode = mode(DR1); Maximum = max(count); Modeprct = round((Maximum/totalevents)*100); Mean = mean(DR1) Minimum = min(numbers);
How would I make it so that I can get the Mode, Maximum, and them to increase with the counter so they dont get overwritten after every loop. I want to be able to reference them again later in the script. The other things like "DR1" and "count I don't care about saving. Is there a way to get them to count up each loop so I get Mode1, Mode2 Mode3 etc.?
Thanks.

Risposta accettata

Walter Roberson
Walter Roberson il 15 Apr 2014

Più risposte (0)

Categorie

Scopri di più su MATLAB 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