5

GUIの実行中にこのエラーが発生しましたが、その意味と修正方法がわかりません...何かアイデアはありますか?

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
4

2 に答える 2

5

tic/toc次の方法で使用できます。

% tic without output argument
tic;
rand(10);
% toc without input argument
te=toc;

また

% tic with output argument
ts=tic;
rand(10);
% toc with input argument
te=toc(ts);

上記のシナリオを混在させることはできません。

ts=tic;
rand(10);
te=toc;   % wrong! toc must be called as toc(ts)

Error using toc
You must call TIC without an output argument before calling TOC without an input
argument.
于 2012-10-15T19:09:21.283 に答える
4

tic / toc matlab関数を使用しています。これらは時間の測定に使用されます。このメッセージは、前に tic を呼び出していないのに toc が呼び出していることを示しています。126 行目を削除するか、最初に tic を呼び出すことができます。

于 2012-10-15T16:55:31.937 に答える