MATLAB: Tic and Toc question

Hi everyone, I just have a quick question. How would I numerate my tic and toc so that I can make my program stop after a certain amount of time? I'm trying to say like, while tic<1 (second), continue, but I am most likely doing it wrong. Can anyone help?

Best Answer

You are close ...
tic
while toc < 1
%do something
end
Related Question