primes
Prime numbers less than or equal to input value
📝Syntax
p = primes(n)
📥Input Arguments
Parameter Description
n scalar, real integer value
📤Output Arguments
Parameter Description
p vector with prime numbers.
📄Description

p = primes(n) returns a row vector containing all the prime numbers less than or equal to n.

The data type of p is the same as that of n.

💡Examples
p = primes(15)
🔗See Also
factor
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub