Factorization of integers, factorization algorithms


MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

To convert a MuPAD notebook file to a MATLAB live script file, see convertMuPADNotebook. MATLAB live scripts support most MuPAD functionality, although there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

MuPAD Functions

factFactorial function
fact2Double factorial function
ifactorFactor an integer into primes
isqrtInteger square root
numlib::ispowerTest for perfect powers
numlib::issqrTest for perfect squares
numlib::factorGaussIntFactorization of Gaussian integers
numlib::numprimedivisorsNumber of prime factors of an integer
numlib::primedivisorsPrime factors of an integer


Primes and Factorizations

Prime numbers are positive integers larger than 1 that have only two positive integer divisors: 1 and the number itself.