egcd.m
by Steven Gregory
28 Apr 2009
(Updated 24 Jan 2011)
Extended greatest common divisor. Finds g = GCD(x(1), ..., x(end)) and v such that g == sum(v.*x).
|
Watch this File
|
| File Information |
| Description |
[g v] = egcd(x) returns g = gcd(x(1), x(2), ..., x(end)) and v such that g == sum(v.*abs(x)). |
| MATLAB release |
MATLAB 7.4 (R2007a)
|
| Other requirements |
The vpi suite of objects is required. |
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 24 Jan 2011 |
Just realized that egcd works on abs(x) and not x. If you need v, use v = sign(x)*v. Then g == sum(v.*x) will be true. |
|
Contact us at files@mathworks.com