Matlab tic toc accuracy
问题 I'm measuring some code in loop fps = zeros(1, 100); for i=1:100 t = tic I = fetch_image_from_source(); % function to get image fps(i) = 1./ toc(t); end plot(fps); And I get average 50 fps. Then I'd like to add imshow() to my code. I understand that imshow is very slow, but I won't include imshow inside tic-toc commands: fps = zeros(1, 100); figure; for i=1:100 t = tic I = fetch_image_from_source(); % function to get image fps(i) = 1./ toc(t); imshow(I); drawnow; end plot(fps); And I get fps