How do you update a variable in a timestep loop?

1 Ansicht (letzte 30 Tage)
zephyr21
zephyr21 am 18 Jun. 2016
Bearbeitet: per isakson am 18 Jun. 2016
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 Kommentar
per isakson
per isakson am 18 Jun. 2016
Bearbeitet: per isakson am 18 Jun. 2016
for jj = 1:60
dt = jj;
...
end
or I missed something

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by