필터 지우기
필터 지우기

Creating a variable that changes with the for loop counter

조회 수: 2 (최근 30일)
James
James 2014년 4월 15일
답변: Walter Roberson 2014년 4월 15일
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