MATLAB: List all possible outcomes of 16 matches

all possible outcomescoin flipcombinationlistMATLABMATLAB and Simulink Student Suiteoutcomeoutcomespermutationstatistic

I am trying to make a code that will list all of the possible outcomes of 16 matches (only wins or losses, no draws), essentially the same as flipping a coin 16 times. I've tried using functions like combnk and nchoosek, but they cannot build a 16 column matrix with only two outcomes.
Ideally, the outcome would be a 16 X 4096 matrix (65,536 combinations) which would look like this
H H H H H H H H H H H H H H H H
H H H H H H H H H H H H H H H A
H H H H H H H H H H H H H H A H
And so on. Or, if the argument needed numbers, like this
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1
Thank you for your help!

Best Answer

dec2bin(0:2^16-1)-'0'