www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/GreatestCommonDivisorsofDoubleValuesExample.m

    %% 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.