From: steevn dfddsad on
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <gkqro5$7qn$1(a)fred.mathworks.com>...
> n=100;
> l=1:n;
> isprime=true(1,n);
> isprime(1)=false;
> p=2;
> isprime(2*p:p:end)=false;
> p=3;
> while p^2<=n
> while ~isprime(p) && p^2<=n
> p=p+1;
> end
> if ~isprime(p)
> break;
> end
> isprime(2*p:p:end)=false;
> p=p+2;
> end
> primesfound=find(isprime)
>
> % Bruno