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
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 on 11 May 2021
Edited: Jan on 11 May 2021
What's wrong with
while true
in Matlab?

More Answers (0)


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


Community Treasure Hunt

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

Start Hunting!

Translated by