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: [mg124363] Re: How to remove the Null character in a Table?
  • From: Shizu <slivo.vitz at msa.hinet.net>
  • Date: Tue, 17 Jan 2012 03:34:56 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

You'd better write your expression in this way:

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

In[]:= Cases[t, _Integer]
Out[]:= {1, 2}

If you leave out the false part of If[], it's a syntax error.



  • Prev by Date: Example of Cellular potts model in mathematica
  • Next by Date: Re: How to remove the Null character in a Table?
  • Previous by thread: Re: How to remove the Null character in a Table?
  • Next by thread: Re: How to remove the Null character in a Table?