Name

primes — primes function

Calling Sequence

[y]=primes(x)

Parameters

x

real scalar

y

vector

Description

Given a real x, primes(x) returns in a vector y all the primes numbers included between 1 and x. If x<2 then primes(x) returns an empty matrix.

Examples

 
x=35
y=primes(x)
 

See Also

factor