ode in a for loop updating initial conditions
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I created the files in attached, main and @greitzer (function). In main I call the function in @greitzer.
Now I would like to put the ode in a for loop to solve the problem for each values of giri.
I'd like the first loop to be from:
t0(1)=0
to the second value of time_rpm(i)
time_rpm(2)
with initial condition y1(1)=0 and y2(0).
Now the second loop, for the second value of giri, so
giri(2)
should be in the interval
t0(2)=time_rpm(2)
tf(2)=time_rpm(3)
with the initial condition to be the last evaluation of the previous loop
y1(i+1) = y(end,1); %initial condition 1
y2(i+1) = y(end,2); %initial condition 2
12 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements 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!