Is there a way to use the prime function to find the prime numbers between two numbers? I want to find the prime numbers between 20,000 and 10,000 and save that to a variable. primes(20000) gives me them all the way to zero and if i try to subtract primes(20000) and primes(10000) it won't let me because there not the same size. Any ideas? Thanks.
MATLAB: Primes function
algebramathprimeprimesstatistics
Related Question
- Write a function ShowPrimes(n) that will find all prime numbers between 1 and n and return them as a vector. Do this using a for loop. Hint: use isprime(x) to check whether x is a prime number. As an example, >> primes=ShowPrimes(20) primes =
- How to create a list where it shows the values from the list 1:N so that in the list it says which numbers are prime
- Code for finding Mersenne Primes
- Sorting through labelled data
Best Answer