Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1999
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Select in Math.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg18532] Re: [mg16518] Re: Select in Math.
  • From: Arnold Knopfmacher <arnoldk at gauss.cam.wits.ac.za>
  • Date: Thu, 8 Jul 1999 22:33:01 -0400
  • References: <199903160859.DAA09380@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Bob

Regarding your solution on extracting increasing sublists:

[mg16518]. Consider

In[42]:=
list={{1,4,3,2},{1,3,2,4},{2,3},{5},{6,8}};

In[43]:=
list=Union[Sort /@ list]

Out[43]=
{{5},{2,3},{6,8},{1,2,3,4}}

In[44]:=
elts=Union[Flatten[%]]

Out[44]=
{1,2,3,4,5,6,8}

In[45]:=
incrlist=Select[list,Union[Flatten[Complement[list,{#}]]]!=elts&]

Out[45]=
{{5},{6,8},{1,2,3,4}}

However, the correct output should be  {{5},{2,3},{6,8}}.

Cheers
Arnold Knopfmacher


  • Prev by Date: Re: Re: Re: easiest way to sort a list?
  • Next by Date: Re: Interpolation[] problem
  • Previous by thread: Re: Thickness in 3D parametric plots
  • Next by thread: Re: Re: Re: Select in Math.