MathGroup Archive 2005

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

Search the Archive

Re: Help! Delete Casses based on column

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58345] Re: Help! Delete Casses based on column
  • From: Rolf Mertig <rolf at mertig.com>
  • Date: Tue, 28 Jun 2005 21:56:43 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

>I need to take a large numeric matrix and remove all the rows that have a
>value less than X in column N 

Mathematica 5.1 for Linux x86 (64 bit)
Copyright 1988-2004 Wolfram Research, Inc.
 -- Motif graphics initialized --

In[1]:= !!f.m
f[m_?MatrixQ, n_Integer, threshold_?NumberQ] := Select[m, #1[[n]] > threshold 
& ];
test = Table[Random[],{5000},{5000}];
Print[Timing[r=f[test, 1234, .2];]] ;
Print[Length[r]];

In[1]:= <<f.m
{0.32995 Second, Null}
3981

---

Greetings,

Rolf Mertig


  • Prev by Date: Re: False image plot
  • Next by Date: More help on sorting out a large list
  • Previous by thread: Help! Delete Casses based on column
  • Next by thread: splinefit