Info

This question is closed. Reopen it to edit or answer.

How can i use various Loops in matlab

2 views (last 30 days)
Rachael Zane
Rachael Zane on 7 Feb 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
I am very new to using MATLAB and i have been trying to work with loops, for making a freeware automatic mouse mover can someone educate me regarding the number of loops that matlab provides and the variation in which i can use them.

Answers (1)

Myrthe B.
Myrthe B. on 7 Feb 2019
The basic loop types in MATLAB are the while loop and the for loop.
x=100
while x>10
x=x-1
end
and:
for n=1:100
x=x+1
end

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!