Create changing variable names inside a loop
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello,
I want to create 120 new variables called:
RMS_BAM_186_Torque_8Nov_TIME
where TIME is a value from 0656 to 0856 <--- these are times, so max value is 0659, 0759, etc.
The function which will be used is:
RMS_BAM_186_Torque_8Nov_TIME = rms(BAM_186_Torque_8Nov_TIME)
where, the variables BAM_186_Torque_8Nov_TIME already exist.
Is there a way to program a loop which will do this, incrementing the TIME variable to step through all 120 iterations?
댓글 수: 0
답변 (1개)
Matt Fig
2012년 11월 9일
Don't program this way in MATLAB! Please take the time to learn proper programming techniques for the language you are using. This helpful FAQ will answer your question and explain how to do it properly.
댓글 수: 2
Walter Roberson
2012년 11월 9일
The rest is just standard array indexing.
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!