This word contains 4 identical consonants, 2 identical vowels and another 2 distinct vowels.
Not in everyday use, still a valid English word for you to find.
Please include in your answer the word, its meaning
and the way you recovered it.
wds=fileread('c:\words\words8.txt');
l=length(wds)/8;
for i=1:l
w=wds(i*8-7:i*8);
v=char.empty;
for j=1:8
if ismember(w(j),'aeiouy')
v=[v w(j)];
end
end
if length(v)==4 && length(unique(v))==3
c=setdiff(w,v);
if length(unique(c))==1
disp(w)
end
end
end
finds "nonunion". In fact the check that two of the vowels matched and the other two didn't (length(unique(v))==3) was not needed, only that there were 4 vowels and that the 4 consonants were all the same.
|
Posted by Charlie
on 2023-08-19 14:45:32 |