MATLAB: Adding 3 numbers out of 5

MATLAB

Hi,
I am trying to do a code for channel interference. I figured out everything else but I'm stuck at a few points.
I have 5 numbers stored under different names, A,B,C,D,E.
I want to take three at a time and add them together for example: A+B+C. I want matlab to do all the combinations. Is that possible? can you tell me how?
Thank you.

Best Answer

Sarah, you could use
data = [A B C D E];
datasum = sum(combnk(data,3),2);