what does this error with tic\toc means?
17 views (last 30 days)
i have this problem - matlab tells me I have an error while running-
Error using toc
You must call TIC without an output argument before calling TOC without an
Error in hand_rotation2/youPress (line 126)
c = toc;
Error while evaluating figure KeyPressFcn
what does it mean, and how can I fix it?
Wayne King on 15 Oct 2012
Edited: Wayne King on 15 Oct 2012
It means to use toc, you have to call tic first somewhere
for ii = 1:10
x(ii) = ii+1;
y = toc;
If you use toc by itself, it must have been preceded by a tic command sometime during the current session, then it gives the time since the most recent tic command. In this latter case, that is probably not what you want.