factor2.m

factor2(n) returns the prime factorization of n as a k by 2 matrix.

Ahora está siguiendo esta publicación

Given a nonnegative integer n, factor2(n) returns the prime factorization of n as a 2 by k matrix, with the k distinct prime factors in the left column and exponents in the right column.

Citar como

David Terr (2026). factor2.m (https://la.mathworks.com/matlabcentral/fileexchange/4966-factor2-m), MATLAB Central File Exchange. Recuperado .

Categorías

Más información sobre Discrete Math en Help Center y MATLAB Answers.

Información general

Compatibilidad con la versión de MATLAB

  • Compatible con cualquier versión

Compatibilidad con las plataformas

  • Windows
  • macOS
  • Linux
Versión Publicado Notas de la versión Action
1.0.0.0

I modified this program so that it sorts the prime factors by columns instead of by rows, allowing for more convenience, especially with large numbers. I also modified it so it now works with negative numbers as well.