vecgcd

版本 1.0.0.0 (1.4 KB) 作者: Steven Gregory
Computes the GCD of the elements of the integer vector V.
540.0 次下载
更新时间 2011/1/28

查看许可证

G = VECGCD(V) is the greatest common divisor of the elements of the integer
vector V. V must be a row or a column vector of integers.We define gcd([]) = 1 and gcd([0 0 ... 0]) = 0.

I believe that this routine is faster than recursively computing GCDs and the algorithm is simple enough to be used for pencil and paper calculations.

引用格式

Steven Gregory (2024). vecgcd (https://www.mathworks.com/matlabcentral/fileexchange/30216-vecgcd), MATLAB Central File Exchange. 检索来源 .

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

Community Treasure Hunt

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

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