Path: news.mathworks.com!not-for-mail
From: Loren Shure <loren@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Greatest commmon divisor
Date: Mon, 15 Dec 2008 20:38:23 -0500
Organization: The MathWorks
Lines: 13
Message-ID: <MPG.23b0d09e505fb8f4989907@news.mathworks.com>
References: <ghukju$ksu$1@fred.mathworks.com>
NNTP-Posting-Host: vpn-client-122-18-ah.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
X-Trace: fred.mathworks.com 1229391500 3593 144.212.122.18 (16 Dec 2008 01:38:20 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 16 Dec 2008 01:38:20 +0000 (UTC)
User-Agent: MicroPlanet-Gravity/2.70.2067
Xref: news.mathworks.com comp.soft-sys.matlab:507207


In article <ghukju$ksu$1@fred.mathworks.com>, nclxin@hotmail.com says...
> Hi, any one know how can get the gcd for an array. The function gcd() in matlabe will give result for a array.
> for example I want to get 2 for the array A= [10 2 10 -4 2 0];
> Is there any function to do that? or how can I do that? 
> 
> Thanks
> 

Check out the function arrayfun

-- 
Loren
http://blogs.mathworks.com/loren