How do I convert this for loop in to while loop with same sequence of number.

1 visualizzazione (ultimi 30 giorni)
for x=0:2:50
disp(x);
end

Risposte (1)

Mohammad Sami
Mohammad Sami il 23 Giu 2020
x = 0;
while x <= 50
disp(x);
x = x + 2;
end

Categorie

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

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by