How to create n consecutive for loops in MATLAB
    5 views (last 30 days)
  
       Show older comments
    
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
      
      
 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. 
See Also
Categories
				Find more on Loops and Conditional Statements in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!