GCD function in matlab

Posted by SalemFayad on Stack Overflow See other posts from Stack Overflow or by SalemFayad
Published on 2010-04-10T08:48:10Z Indexed on 2010/04/10 8:53 UTC
Read the original article Hit count: 362

Filed under:
|
|
|

hi, i am looking for a way to implement the "gcd" function used in matlab in another language but i really cant understand the way it functions.

it says in http://www.mathworks.com/access/helpdesk/help/techdoc/ref/gcd.html that:

"[G,C,D] = gcd(A,B) returns both the greatest common divisor array G, and the arrays C and D, which satisfy the equation: A(i).*C(i) + B(i).*D(i) = G(i)."

but it says nothing about how it calculates C and D.

i would be grateful if someone has a clearer idea about this subject! thanks:)

© Stack Overflow or respective owner

Related posts about matlab

Related posts about gcd