Extrapolating a loop to a threshold

1 visualizzazione (ultimi 30 giorni)
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?

Risposta accettata

Thorsten
Thorsten il 24 Set 2015
Modificato: Thorsten il 24 Set 2015
y = 2;
threshold = 10; % sample threshold
while y < threshold
y = y^2 % sample calculation, put your function here
end

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by