stop execution of code to check results
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Star Strider
2021-9-11
编辑:Star Strider
2021-9-11
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 个评论
更多回答(2 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Debugging and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!