MATLAB 帮助中心
质因数
f = factor(n)
f = factor(n) 返回包含 n 的质因数的行向量。向量 f 与 n 具有相同的数据类型。
n
f
示例
全部折叠
f = factor(200)
f = 1×5 2 2 2 5 5
乘以 f 的元素以重新生成输入值。
prod(f)
ans = 200
n = uint16(138); f = factor(n)
f = 1×3 uint16 row vector 2 3 23
乘以 f 的元素以重新生成 n。
ans = 138
输入值,指定为非负实整数标量。
示例: 10
10
示例: int16(64)
int16(64)
数据类型: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
全部展开
用法说明和限制:
最大双精度输入为 2^33。
2^33
最大单精度输入为 2^25。
2^25
输入 n 的类型不能为 int64 或 uint64。
backgroundPool
ThreadPool
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
在 R2006a 之前推出
isprime | primes
isprime
primes
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处