n=671;
%data=a; // data loaded from excel and named as a variable
for i=1:n
for j=i+1:n
for k=j+1:n
zz= (i)+ (j)+ (k)
if zz==30;
re=i & j & k
end
end
end
end
For this code I have loaded the excel data in "a" variable. I want to sum the all possible combinations of size three.