Contents
Previous
Next
Subchapters
Current Chapters->
abs
sqrt
max
pmax
maxs
mins
conj
imag
sign
floor
ceil
round
roundoff
mod
rem
colunmod
unwrap
factorl
primes
Parent Chapters->
Omatrix6
elementary
algebraic
primes
Search Tools->
contents
reference
index
search
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]