Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Greatest commmon divisor
Date: Tue, 16 Dec 2008 08:16:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <gi7o45$297$1@fred.mathworks.com>
References: <ghukju$ksu$1@fred.mathworks.com> <ghul2u$rfp$1@fred.mathworks.com> <ghum4l$d95$1@fred.mathworks.com> <gi7mqt$87b$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1229415365 2343 172.30.248.37 (16 Dec 2008 08:16:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 16 Dec 2008 08:16:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:507246

"Jos " <#10584@fileexchange.com> wrote in message <gi7mqt$87b$1@fred.mathworks.com>...
> What about
> 
> min(gcd(A(1:end-1),A(2:end)))
> 
> Jos

  I don't think that would work, Jos, even with zeros eliminated.  Let A = [15,21,35].  Then gcd(A(1:end-1),A(2:end)) would yield [3,7] but the minimum of these is not the gcd of the three combined quantities.  The greatest common factor of all three is simply 1, not this minimum.

Roger Stafford