Creating a variable that changes with the for loop counter

8 次查看(过去 30 天)
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.

采纳的回答

Walter Roberson
Walter Roberson 2014-4-15

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by