Loading [Contrib]/a11y/accessibility-menu.js

primes

Returns all primes up to X.

Syntax

primes(x)

Inputs

x
Any real or complex integer.
Type: double | integer
Dimension: scalar

Outputs

R
Resulting primes vector.

Example

Simple and complex input primes examples.

primes(17)
ans = [Matrix] 1 x 7
2  3  5  7  11  13  17