factor

Prime factors

Syntax

  • f = factor(n)

Input argument

  • n - real, nonnegative integer scalar

Output argument

  • p - vector with Prime factors.

Description

f = factor(n) returns a row vector with the prime factors of n.

Vector f is of the same data type as n.

Example

f = factor(204)

See also

primes.

History

Author

Allan CORNET

Last updated