Clear Filters
Clear Filters

Is it possible to run a "for" loop by manually assigning specific values to the variable ?

3 views (last 30 days)
I want to run a "for" loop by manually assigning specific values to the variable, as shown below. Is that possible?
for i = 1,3,6,7,11,18.
.............
end

Accepted Answer

Walter Roberson
Walter Roberson on 23 Jun 2016
for i = [1,3,6,7,11,18]
.............
end

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!