How do you update a variable in a timestep loop?

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 comentario

per isakson
per isakson el 18 de Jun. de 2016
Editada: per isakson el 18 de Jun. de 2016
for jj = 1:60
dt = jj;
...
end
or I missed something

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 18 de Jun. de 2016

Editada:

el 18 de Jun. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by