フィルターのクリア

Exit infinite loop in script via expression

1 回表示 (過去 30 日間)
Jon
Jon 2014 年 4 月 23 日
コメント済み: Jan 2014 年 4 月 23 日
Hi, is there a way to basically detect an infinite loop and stop it within a script programmatically? Let's say you had a vector, an a while loop which with a function puts a random number in the vector if there's space i.e. m(x, y) == 0. With the condition of the while loop being:
while (m(rrn, rcn) ~= 0)
where 'm' is the vector, 'rrn' is the 'random row number' etc.
  1 件のコメント
Jan
Jan 2014 年 4 月 23 日
The example is not clear to me. Why is this an infinite loop? As long as this is not clear, detecting such cases programmatically is impossible.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by