Is ?expand.grid what you are looking for? Rgds, Rainer On Friday 15 March 2013 09:22:15 Amir wrote: > Hi every one, > > I have two sets T1={c1,c2,..,cn} and T2={k1,k2,...,kn}. > How can I find the sets as follow: > > (c1,k1), (c1,k2) ...(c1,kn) (c2,k1) (c2,k2) .... (c2,kn) ... (cn,kn) > > Thanks. > Amir > >