Re: Re: IntervalComplement
- To: mathgroup at smc.vnet.net
- Subject: [mg70375] Re: [mg70324] Re: IntervalComplement
- From: "Chris Chiasson" <chris at chiasson.name>
- Date: Sat, 14 Oct 2006 03:08:16 -0400 (EDT)
- References: <200610130530.BAA01097@smc.vnet.net>
Thank you for your reply. On 10/13/06, Bill Rowe <readnewsciv at sbcglobal.net> wrote: > On 10/12/06 at 5:38 AM, chris at chiasson.name (Chris Chiasson) wrote: > > >Has anyone implemented this function before? I need something that > >can do this. > > Hmm... One way to interpret what you have asked for is a > function that returns a list of intervals containing all points > not contained by the intervals returned by IntervalUnion. Using > that as the function definition then IntervalComplement could be > written as: > > In[7]:= > IntervalComplement[int___Interval] := > ({Interval[{-Infinity, Min[#1]}], > Interval[{Max[#1], Infinity}]} & )[ > Flatten[Apply[List, {int}, {1}]]] > > testing: > > In[9]:= > int1=Interval[{1,10}]; > int2=Interval[{8,12}]; > int3=Interval[{20,30}]; > IntervalComplement[int1,int2,int3] > > Out[12]= > {Interval[{-Infinity, 1}], Interval[{30, Infinity}]} > > seems to work correctly. But this result doesn't seem useful to > me which leads me to believe I don't really understand what you > are asking for. > -- > To reply via email subtract one hundred and four > > -- http://chris.chiasson.name/
- References:
- Re: IntervalComplement
- From: Bill Rowe <readnewsciv@sbcglobal.net>
- Re: IntervalComplement