i have a while loop i wanna set the condition so it does 'while the array has less than 10 elements it runs'.

1 visualizzazione (ultimi 30 giorni)
i have an array i = []; how do i code so that while i has less than 10 elements it runs.

Risposta accettata

Roger Stafford
Roger Stafford il 11 Mar 2015
while length(i) < 10
.....

Più risposte (0)

Categorie

Scopri di più su Loops and Conditional Statements in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by