%% Greatest Common Divisors of Double Values

A = [-5 17; 10 0];
B = [-15 3; 100 0];
G = gcd(A,B)

% gcd returns positive values, even when the inputs are negative.
% Copyright 2012 The MathWorks, Inc.