Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!news-fra1.dfn.de!feeder.erje.net!aioe.org!not-for-mail
From: dpb <none@non.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Logical Rules
Date: Thu, 13 Sep 2007 12:25:21 -0500
Organization: Aioe.org NNTP Server
Lines: 33
Message-ID: <fcbruo$hsi$1@aioe.org>
References: <fcbpn6$eo0$1@fred.mathworks.com>
NNTP-Posting-Host: YesoOMATPUG7w64mDFXH/Q.user.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
Xref: news.mathworks.com comp.soft-sys.matlab:428401



Christopher Mouton wrote:
> I am trying to see if Matlab has a toolbox for something 
> like this, or where I might look for ideas on how to 
> efficiently solve the following
> 
> A{1}=[1,2]
> A{2}=[2,3]
> A{3}=[1,3]
> A{4}=[1,2,3,4]
> 
> This reads:
> 
> Position 1 can be 1 or 2
> Position 2 can be 2 or 3
> Position 3 can be 1 or 3
> Position 4 can be 1, 2, 3 or 4
> 
> Given that each number can only be used once, we know that 
> Position 4 must be 4.
> 
> So my question is, how could I perform such logic in a 
> general way? Any ideas where I should look?

unique(), maybe?

But, strictly speaking, by my reading your example is inconsistent to 
start with -- if each value can be used only once, then A(2) would have 
to be [3] and then A(3) would have to be []?

Think need more precise definition of the problem and the expected 
solution...

--