Re: Finding Clusters
- To: mathgroup at smc.vnet.net
- Subject: [mg117118] Re: Finding Clusters
- From: James Stein <mathgroup at stein.org>
- Date: Thu, 10 Mar 2011 06:09:10 -0500 (EST)
Here is one way: Given a list such as list = {{x ->1.1, y-> 2.2}, {x ->3.3, y ->4.4}} you can remove the "x's and y's" this way: list = list /. Rule[a_, b_] -> b You could discover this yourself by examining the structure of 'list' with 'FullForm": list // FullForm hth, James On Wed, Mar 9, 2011 at 4:02 AM, Martin Vavpoti=C4=8D <martin.vavpotic at gmail.com>wrote: > Hello everyone. > > I have a large array of numbers (1000 ==D72). I wish to find clusters in > that mesh of numbers but the FindClusters method is giving me a hard > time. I think it's because of those non-numeric leftovers from NSolve > (x -> and y ->). > > {{x -> 9.95043, y -> 0.201587}, {x -> -0.0507389, > y -> 0.39451}, {x -> -0.0502288 + 0.192544 I, > y -> 0.199992 - 2.42154*10^-6 I}, {x -> -0.0502288 - 0.192544 I, > y -> 0.199992 + 2.42154*10^-6 I}, <<992>>, {x -> -0.0507405, > y -> 0.394519}, {x -> -0.0502287 + 0.192544 I, > y -> 0.2}, {x -> -0.0502287 - 0.192544 I, > y -> 0.2}, {x -> -0.0507405, y -> 0.00548135}} > > I know that if you write something like %[[1,2,2]] you get only the > numbers but I have a whole array here. How do I get the whole array to > lose those y -> ? > > Help anyone? > >