MathGroup Archive 2005

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

Search the Archive

Re: Help! Delete Casses based on column


In[51]:=
f[m_,n_Integer,x_?NumberQ]:=m/.a_List/;a[[n]]<x:>Sequence[];
In[52]:=
mat={{1,2,3},{4,5,6},{7,8,9},{10,11,12}};
Col=2;  X=8;
f[mat,Col,X]
Out[54]=
{{7,8,9},{10,11,12}}

Alternatively:
In[56]:=
f[m_,n_Integer,x_?NumberQ]:=
    ReplacePart[m,Hold[],
        Position[Transpose[m][[n]],
          a_/;a<x]]//ReleaseHold;
In[57]:=
f[mat,Col,X]
Out[57]=
{{7,8,9},{10,11,12}}


  • Prev by Date: Integral problem
  • Next by Date: Re: Spline
  • Previous by thread: Re: Help! Delete Casses based on column
  • Next by thread: Help! Delete Casses based on column