How do you update a variable in a timestep loop?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have many equations in a for loop that will need to be updated with each iteration of 1 through 60 with dt being 1 (so 1,2,3,4,5...60). The variable in each equation needing to be updated is dt. First time through it will be 1, second time through it will be 2, so on and so forth. How can I do this?
댓글 수: 1
per isakson
2016년 6월 18일
편집: per isakson
2016년 6월 18일
for jj = 1:60
dt = jj;
...
end
or I missed something
답변 (0개)
참고 항목
카테고리
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!