How could i write matlab code for Sequencing of machining operation using for loop?
Show older comments
How could i get these 16 possibl combinations using matlab code?

2 Comments
Darshan Ramakant Bhat
on 30 Dec 2019
You should put more context to this question. It is hard to understand what you are trying to do from the question
Usman Ahmed
on 30 Dec 2019
Answers (1)
KALYAN ACHARJYA
on 30 Dec 2019
I have reached this label, do apply more logic and get the exact result, it can be possible, but here code is little non efficient. If you manage any efficient way, it would be recomended.
count=1;j=1;
for i=1:6
while count<=8
data{count,i}=['Seq',num2str(i),num2str(j)];
count=count+1;
end
while count<=16
data{count,i}=['Seq',num2str(i),num2str(j+1)];
count=count+1;
end
count=1;
end
data
Result:
'Seq11' 'Seq21' 'Seq31' 'Seq41' 'Seq51' 'Seq61'
'Seq11' 'Seq21' 'Seq31' 'Seq41' 'Seq51' 'Seq61'
'Seq11' 'Seq21' 'Seq31' 'Seq41' 'Seq51' 'Seq61'
'Seq11' 'Seq21' 'Seq31' 'Seq41' 'Seq51' 'Seq61'
'Seq11' 'Seq21' 'Seq31' 'Seq41' 'Seq51' 'Seq61'
'Seq11' 'Seq21' 'Seq31' 'Seq41' 'Seq51' 'Seq61'
'Seq11' 'Seq21' 'Seq31' 'Seq41' 'Seq51' 'Seq61'
'Seq11' 'Seq21' 'Seq31' 'Seq41' 'Seq51' 'Seq61'
'Seq12' 'Seq22' 'Seq32' 'Seq42' 'Seq52' 'Seq62'
'Seq12' 'Seq22' 'Seq32' 'Seq42' 'Seq52' 'Seq62'
'Seq12' 'Seq22' 'Seq32' 'Seq42' 'Seq52' 'Seq62'
'Seq12' 'Seq22' 'Seq32' 'Seq42' 'Seq52' 'Seq62'
'Seq12' 'Seq22' 'Seq32' 'Seq42' 'Seq52' 'Seq62'
'Seq12' 'Seq22' 'Seq32' 'Seq42' 'Seq52' 'Seq62'
'Seq12' 'Seq22' 'Seq32' 'Seq42' 'Seq52' 'Seq62'
'Seq12' 'Seq22' 'Seq32' 'Seq42' 'Seq52' 'Seq62'
Categories
Find more on Entering Commands 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!