factor2
by Brett Shoelson
08 Sep 2003
(Updated 10 Sep 2003)
Returns the factors (not only the prime factors) of positive integer k, including k itself.
|
Watch this File
|
| File Information |
| Description |
%A = FACTOR2(K)
%Returns the factors (not only the prime factors) of k, including k itself.
%This complements the usage of TMW's factor function, which returns only
%prime factors.
%E.g., >> a=factor(1365), b=factor2(1365)
% ANS: a = 3 5 7 13
% b = 1 3 5 7 13 15 21 35 39 65 91 105 195 273 455 1365
%Written by Brett Shoelson, Ph.D.
%shoelson@helix.nih.gov
%9/10/01; updated 9/08/03.
%Tested under ML 6.5 and 6.1. |
| MATLAB release |
MATLAB 6.5 (R13)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (3) |
| 03 Sep 2004 |
H R
|
|
|
| 26 Apr 2006 |
M Khan
|
|
|
| 30 Apr 2008 |
dhiraj mahajan
|
|
|
| Updates |
| 10 Sep 2003 |
Now includes function isinteger as a subfunction. |
|
Contact us at files@mathworks.com