From: steevn dfddsad on 14 Feb 2010 14:08 "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
|
Pages: 1 Prev: please help just to verify Next: Help! meshc(x,y,z,v) plot is ignoring the "v" vector |