MATLAB Function Reference |
Generate list of prime numbers
Syntax
Description
p = primes(n)
returns a row vector of the prime numbers less than or equal to n
. A prime number is one that has no factors other than 1
and itself.
Examples
See Also
preferences | print, printopt |
© 1994-2005 The MathWorks, Inc.