One solution is to use the NDGRID function to generate all index combinations in your sets:
C = {'ab' 'lmn' 'vwxy'}; %
sizeVec = cellfun('prodofsize',C); %
[index3,index2,index1] = ndgrid(1:sizeVec(3),... %
1:sizeVec(2),... %
1:sizeVec(1)); %
combMat = [C{1}(index1(:)); ... %
C{2}(index2(:)); ... %
C{3}(index3(:))].';
And you should get the following for combMat:
alv
alw
alx
aly
amv
amw
amx
amy
anv
anw
anx
any
blv
blw
blx
bly
bmv
bmw
bmx
bmy
bnv
bnw
bnx
bny
1 2, NDGRID C{3}(index3(:)) combMat.
, C , . , combMat .
UPDATE:
, ( ). . , :
combMat = allcombs(C{:});