Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: How to remove the Null character in a Table?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124325] Re: How to remove the Null character in a Table?
  • From: "Scot T. Martin" <smartin at seas.harvard.edu>
  • Date: Tue, 17 Jan 2012 03:21:42 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201201162211.RAA15417@smc.vnet.net>

In[1]:= DeleteCases[Table[If[i < 3, i], {i, 5}], Null]

Out[1]= {1, 2}

________________________________________
From: Rex [aoirex at gmail.com]
Sent: Monday, January 16, 2012 17:11
To: mathgroup at smc.vnet.net
Subject: [mg124325] How to remove the Null character in a Table?

For example,

Table[If[i < 3, i,], {i, 5}]
will give
{1, 2, Null, Null, Null}

But I want the result to be {1,2}.

Any trick for this?




  • Prev by Date: Re: how can one use mathematica get the approximate derivative of {x,y} data points?
  • Next by Date: Re: How to remove the Null character in a Table?
  • Previous by thread: How to remove the Null character in a Table?
  • Next by thread: Re: How to remove the Null character in a Table?