Hi!
I want to print some text (ex. test) 20 times, every 1 second. I tried with for statement:
close all;clear all;ticfor i=1:20 toc disp('test'); pause(i-toc);end
If I run this code, I see that time drifts also for 20 ms from whole second (I know that It depends on many things, occupancy of CPU is for ex. one thing). Is any other option to come closer to the whole second?
Thank you! Best regards, Dejan
Best Answer