Combination command in Matlab

Status
Not open for further replies.

ablendos

Junior Member level 3
Joined
Jan 8, 2004
Messages
31
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
246
matlab problem!!

Dear all:
I want to list all result of number serial that are pick 6 number from 42 number.
Please tell me how to do it???
Thank you!!!
 

Re: matlab problem!!

i AM NOT GETTING UR PROBLEM, PL. EXPLAIN IT.
 

Re: matlab problem!!

sorry about it !!

I mean list all number result, just like
1,2,3,4,5,6
1,2,3,4,5,7
1,2,3,4,5,8
1,2,3,4,5,9
1,2,3,4,5,10
......
.....
......
......
37,38,39,40,41,42.
 

matlab problem!!

Those are called "combinations".
Try this, but it will take a few minutes:

result = nchoosek(1:42,6);
 

Re: matlab problem!!

Dear echo47:
Thank your help!!!
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…