Ahora está siguiendo esta publicación
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
NFACTORK All integer factorings of integer N which have K elements.
T = NFACTORK(N,K) returns an array which has K columns such that all(prod(T,2)==N) is true.
Examples:
T = nfactork(24,3) % produces
T =
1 1 24
1 2 12
1 3 8
1 4 6
2 2 6
2 3 4
such that: all(prod(T,2)==24) % True
T = nfactork(N,inf);
% Last row is factor(N)
% unique(T) lists all divisors of N
This was written in response to a NewsGroup question.
Like many combinatorial problems, this one can grow very quickly and soon overwhelm the system resources. Suggestions for improvements are always welcome.
See the function help and comments in code for more information.
Citar como
Matt Fig (2026). NFACTORK (https://es.mathworks.com/matlabcentral/fileexchange/27086-nfactork), MATLAB Central File Exchange. Recuperado .
Agradecimientos
Inspiración para: factorpairs
Información general
- Versión 1.1.0.0 (3,26 KB)
Compatibilidad con la versión de MATLAB
- Compatible con cualquier versión
Compatibilidad con las plataformas
- Windows
- macOS
- Linux
