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

2 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by