How to create n consecutive for loops in MATLAB

5 views (last 30 days)
I want to create n for loops such as
for a_1=1:2
do
for a_2=1:2
do
....
for a_n=1:2
do
end
.....
end
end
  1 Comment
KSSV
KSSV on 1 Jan 2019
Write them ..simple.....
First you need to think are so many loops necessary? In MATLAB we can avoid lot of loops by vectorization.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 1 Jan 2019

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!