From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: k (3) Vectors of ones and zeros "combining" together
Date: Tue, 17 Jan 2012 23:42:08 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <jf510f$nv5$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1326843728 24549 (17 Jan 2012 23:42:08 GMT)
NNTP-Posting-Date: Tue, 17 Jan 2012 23:42:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3273754
Xref: comp.soft-sys.matlab:754979

Hello all!
I would like to generate 3 vectors of a specified length, say N, containing ones and zeros with these constraints:

-all 3 vectors have at least a 1
-the sum of these 3 vectors gives ones(1,N), a vector with all ones

*this is the only way I think I have for exploring all the possible combinations of a given set of N elements in 3 groups

Thank you!