フィルターのクリア

How to Create Infinite For Loops MATLAB

36 ビュー (過去 30 日間)
Sabri Çetin
Sabri Çetin 2016 年 6 月 22 日
コメント済み: Abdulrahman Saad 2019 年 10 月 10 日
In matlab, is there a way of creating infitine for loops?
Also creating an infinite vector would be sufficient I guess, is that possible?
I tried the following buy I do NOT recommend doing this;
i = 1 ;
while ( i )
v(i) = i ;
i = i + 1 ;
end
This caused an error in my computer, is there any other trial? Any answer is appreciated.
  2 件のコメント
KSSV
KSSV 2016 年 6 月 22 日
What do you mean by infinite?
Sabri Çetin
Sabri Çetin 2016 年 6 月 22 日
We can characterize it from my point of view as the following.
The program including a loop runs properly(no error), but no command after the loop can be executed.
The program enters the loop body and it cannot leaves the loop body. The execution never ends, that is what I mean.

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

採用された回答

cbrysch
cbrysch 2016 年 6 月 22 日
for k=1:inf
disp(k)
end
  1 件のコメント
Abdulrahman Saad
Abdulrahman Saad 2019 年 10 月 10 日
Thank you very much

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by