Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7925
| From | David Reiss <dbreiss@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How to remove the Null character in a Table? |
| Date | 2012-01-17 08:45 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jf3cf7$nk9$1@smc.vnet.net> (permalink) |
| References | <jf13je$5ln$1@smc.vnet.net> |
here's one possibility:
Table[If[i < 3, i,], {i, 5}] /. Null -> Sequence[]
--David
On Jan 16, 7:01 am, Rex <aoi...@gmail.com> wrote:
> 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 — Previous in thread | Next in thread | Find similar | Unroll thread
How to remove the Null character in a Table? Rex <aoirex@gmail.com> - 2012-01-16 12:01 +0000 Re: How to remove the Null character in a Table? roby <roby.nowak@gmail.com> - 2012-01-17 08:36 +0000 Re: How to remove the Null character in a Table? David Reiss <dbreiss@gmail.com> - 2012-01-17 08:45 +0000 Re: How to remove the Null character in a Table? Ray Koopman <koopman@sfu.ca> - 2012-01-17 08:47 +0000 Re: How to remove the Null character in a Table? "andre.robin3" <andre.robin3@wanadoo.fr> - 2012-01-17 08:52 +0000
csiph-web