How to repeat a command until a condition is met?
Ältere Kommentare anzeigen
Here is my part of my code thus far. How would I decrease value of Df until v is approximately 70?
Df=100;
V=exp(-r*T)*min(Df*x_non_us(m+1,:),S_us(m+1,:));
v=mean(V);
while
if abs(v-70)>.1
Df=Df-.05;
else
Df=Df;
end
end
Df
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!