Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: plot primes only

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88721] Re: [mg88729] plot primes only
  • From: "Thomas Dowling" <thomasgdowling at gmail.com>
  • Date: Wed, 14 May 2008 07:00:27 -0400 (EDT)
  • References: <200805141006.GAA09768@smc.vnet.net>

Hello,

In[695] =  list = Table[i, {i, 1, 100}];


In[690]= Select[list,  PrimeQ[# ] &]

Out[690]= {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59,
61, \
67, 71, 73, 79, 83, 89, 97}

Tom Dowling

On Wed, May 14, 2008 at 11:06 AM, markus mooslechner <
markus.mooslechner at chello.at> wrote:

> hi everyone!
>
> a quick one:
> how can i tell mathematica to only list the primes from a list of data
> and omit the others?
> primeQ only tells me the boolean result
>
>
> thanx
> markus
>
> www.humanchaos.net
>
>



  • References:
  • Prev by Date: Re: plot primes only
  • Next by Date: Re: export mathematica table to .mat (MATLAB) format.Please help!!!
  • Previous by thread: plot primes only
  • Next by thread: Re: plot primes only