MATLAB Function Reference Previous page   Next Page
primes

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

factor


Previous page  preferences print, printopt Next page

© 1994-2005 The MathWorks, Inc.