How can we change two variables in loop?

4 visualizaciones (últimos 30 días)
Atr cheema
Atr cheema el 19 de Nov. de 2015
Editada: Atr cheema el 20 de Nov. de 2015
For example I want to write an equation in which it takes first value of value g for first value of t, then it takes first two values of g for second value of t and so on and so forth until it takes all the values of g for last value of t. I can’t make a normal nested loop as it will change all values of g for one value of t.
  2 comentarios
Walter Roberson
Walter Roberson el 19 de Nov. de 2015
?? You do not appear to have a g in that expression? You have D f pi t tau x (though it is not entirely clear whether D is a constant or is the differential operator)
Atr cheema
Atr cheema el 20 de Nov. de 2015
Editada: Atr cheema el 20 de Nov. de 2015
Sorry I forgot to mention that f(tow) in this equation is g. f(tow) is a function which represents hight of flood wave in a stream at during a time interval starting from 0 to t. h(x,t) is hight a specific t. What I want to have is a series of h values for all the t values( t = 0 which is start of wave to t=say 10 minutes which means wave lasted for 10 minutes. Suppose our time step is of 1 minutes meaning d(tow) is 1 and f(tow) or g is value of wave hight at/after every time step. D is a constant and x is also a constant representing distance.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by