while loop in matlab

1 view (last 30 days)
Soveatin Kuntur
Soveatin Kuntur on 11 May 2021
Commented: Jan on 12 May 2021
I want to iterate like on javascript. I dont know how to define true in matlab
while(true)
  3 Comments
Soveatin Kuntur
Soveatin Kuntur on 12 May 2021
sorry typo. I was saying I dont know how to. Thanks for the answer! I just knew that matlab is having while true itself
Jan
Jan on 12 May 2021
true is an existing Matlab command, which creates a logical variable. Instead of "while true" you can use "while 1" also.

Sign in to comment.

Accepted Answer

Jan
Jan on 11 May 2021
Edited: Jan on 11 May 2021
What's wrong with
while true
in Matlab?

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!