Info

此问题已关闭。 请重新打开它进行编辑或回答。

debugging operation

1 次查看(过去 30 天)
som
som 2012-5-8
关闭: MATLAB Answer Bot 2021-8-20
Hi, I wrote a program and I want to debug it usnig 'keyboard command'.
clc; clear; tic ;
for i=1:100
a=i^2+i+10
keyboard
end
toc
I want to finish debugging operation after seeing some results for i=1,2,3, etc, depend on the my interest. How can I do it?

回答(1 个)

Daniel Shub
Daniel Shub 2012-5-8
I am not quite sure what you are asking but what about
clc; clear; tic ;
for i=1:100
a=i^2+i+10
if i < 3
keyboard
end
end
toc

此问题已关闭。

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by