factor2

版本 1.0.0.0 (1.4 KB) 作者: Brett Shoelson
Returns the factors (not only the prime factors) of positive integer k, including k itself.
2.7K 次下载
更新时间 2003/9/10

查看许可证

%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.

引用格式

Brett Shoelson (2024). factor2 (https://www.mathworks.com/matlabcentral/fileexchange/3944-factor2), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Discrete Math 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Now includes function isinteger as a subfunction.