Contents Previous Next Subchapters

Computing Prime Numbers
Syntax primes(N)
See Also int

Description
Returns an integer row vector containing the primes less than or equal to N, where N is an integer scalar.

Example
     primes(20)
returns
     [ 2 , 3 , 5 , 7 , 11 , 13 , 17 , 19]