Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7944

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

From Adriano Pascoletti <adriano.pascoletti@uniud.it>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: How to remove the Null character in a Table?
Date 2012-01-17 11:00 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jf3kc4$q93$1@smc.vnet.net> (permalink)
References <201201162211.RAA15417@smc.vnet.net>

Show all headers | View raw


In[10]:= Table[If[i < 3, i, Sequence @@ {}], {i, 5}]
Out[10]= {1, 2}


Adriano Pascoletti


2012/1/16 Rex <aoirex@gmail.com>

> 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?
>
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: How to remove the Null character in a Table? Adriano Pascoletti <adriano.pascoletti@uniud.it> - 2012-01-17 11:00 +0000

csiph-web