Clear Filters
Clear Filters

How to find prime numbers?

3 views (last 30 days)
Grace
Grace on 4 Oct 2014
Answered: Dave on 4 Oct 2014
Hi,
primes(25)
gives me the prime numbers that are less or equal to 25. What if i want to find primes numbers that are greater than 25 but less than 50?

Accepted Answer

Dave
Dave on 4 Oct 2014
Hi,
A=primes(50); A(length(primes(25))+1:end)
Dave

More Answers (0)

Categories

Find more on Discrete Math in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!