How can I save the number of iterations in while loop?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Arianna Serpi
am 30 Mär. 2017
Kommentiert: Star Strider
am 2 Apr. 2017
I'm implementing a code to solve linear algebraic system with Gauss-Seidel algorithm. I need to save the number of iterations that are done by the while loop in the iterative process. how can i do?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 30 Mär. 2017
Set up a counter variable.
Example:
count = 0;
while -CONDITION-
-DO CALCULATIONS-
-UPDATE CONDITION VARIABLE-
count = count + 1;
end
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!