MATLAB Function Reference    
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


  prefdir print, printopt