Path: news.mathworks.com!not-for-mail
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$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1326843728 24549 172.30.248.45 (17 Jan 2012 23:42:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 17 Jan 2012 23:42:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3273754
Xref: news.mathworks.com 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!