what does this error with tic\toc means?
조회 수: 11 (최근 30일)
이전 댓글 표시
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
input argument.
Error in hand_rotation2/youPress (line 126)
c = toc;
Error while evaluating figure KeyPressFcn
what does it mean, and how can I fix it?
댓글 수: 0
채택된 답변
Wayne King
2012년 10월 15일
편집: Wayne King
2012년 10월 15일
It means to use toc, you have to call tic first somewhere
tic;
for ii = 1:10
x(ii) = ii+1;
end
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.
댓글 수: 2
추가 답변 (1개)
Nicolas Rodriguez
2016년 1월 8일
I have the same problem. My code runs as long as I keep matlab open. Once I close it, it won't let me run it and show me error
참고 항목
카테고리
Help Center 및 File Exchange에서 Debugging and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!