factor2.m
by David Terr
19 May 2004
(Updated 26 May 2004)
factor2(n) returns the prime factorization of n as a k by 2 matrix.
|
Watch this File
|
| File Information |
| Description |
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. |
| MATLAB release |
MATLAB 6.0 (R12)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (3) |
| 25 May 2004 |
Jos vdG
|
|
|
| 25 May 2004 |
Jos vdG
|
|
|
| 15 May 2006 |
Not Happy Jan
|
|
|
| Updates |
| 26 May 2004 |
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. |
|
Contact us at files@mathworks.com