For loop every combination
3 views (last 30 days)
Show older comments
I want for loops to check every element from 1 to n with all other elements. so letst say n=4
So I want to check Number 1 with 2,3 and 4// check number 2 with 3 and 4// and check number 3 with 4.
Can I build one or maybe two for loops for something like that?
Sulaymon Eshkabilov on 16 Jun 2021
Go over this help documentation and will understand how and what to do with [for ... end] loop iteration
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!