error a>b = true when a=b
Mostra commenti meno recenti
in a cycle while a>b. when i get a=b inside the cycle the program doesn't stop.. if i do while a<b doesn't stop too.. if i print the number they are equal(eg 0.005). can be an approximation problem?
k=2;
while (f(x_old,y_old)<f(aux_x,aux_y))
aux_x = x_old - (1/k)*step_x;
aux_y = y_old - (1/k)*step_y;
k=k+1;
end
1 Commento
Azzi Abdelmalek
il 9 Feb 2013
Modificato: Azzi Abdelmalek
il 9 Feb 2013
What do you want exactly?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Introduction to Installation and Licensing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!