stop execution of code to check results
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Robert Demyanovich
am 11 Sep. 2021
Bearbeitet: Star Strider
am 11 Sep. 2021
Is there a way to stop code from executing so that results can be checked. For example something like
if i == 100000
Stop
end
I want to check the values of a parameter when the iteration is equal to 100,000.
How can I do that?
0 Kommentare
Akzeptierte Antwort
Star Strider
am 11 Sep. 2021
Bearbeitet: Star Strider
am 11 Sep. 2021
I would just display it instead —
if i == 100000
fprintf('Parameter = %f at iteration %d\n', Parameter, i)
end
Of course, it is also possible to save these to a vector.
.
0 Kommentare
Weitere Antworten (2)
Siehe auch
Kategorien
Mehr zu Debugging and Analysis 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!