Borrar filtros
Borrar filtros

Extrapolating a loop to a threshold

2 visualizaciones (últimos 30 días)
Andrew Wileman
Andrew Wileman el 24 de Sept. de 2015
Comentada: Andrew Wileman el 24 de Sept. de 2015
Hi, I have a problem in estimating some data up to a threshold. Basically, what I would like to do is pass a data value to an equation and then loop the calculation until it reaches a threshold. Can anyone please help?

Respuesta aceptada

Thorsten
Thorsten el 24 de Sept. de 2015
Editada: Thorsten el 24 de Sept. de 2015
y = 2;
threshold = 10; % sample threshold
while y < threshold
y = y^2 % sample calculation, put your function here
end
  1 comentario
Andrew Wileman
Andrew Wileman el 24 de Sept. de 2015
That's great, thank you very much Thorsten.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by