How to combine 3 for loops into one?
Show older comments
I have the following code, which I would like to create a loop for but I have 3 variables that I would like to change.
I have made a loop with one variable where i change the columns but not sure how I can do it like this
The code below is just an example but I need to do this for a much larger range of about 50 for my image.
I(54:69,16,:)= I(39:54,16,:)
I(69:84,16,:)= I(84:99,16,:)
I(55:70,17,:)= I(40:55,17,:)
I(70:85,17,:)= I(85:100,17,:)
I(56:71,18,:)= I(41:56,18,:)
I(71:86,18,:)= I(86:101,18,:)
Accepted Answer
More Answers (0)
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!