Path: news.mathworks.com!not-for-mail
From: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Common tangent
Date: Wed, 28 Nov 2007 05:47:40 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <fiivds$lqs$1@fred.mathworks.com>
References: <fihu0m$quf$1@fred.mathworks.com>
Reply-To: "Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1196228860 22364 172.30.248.35 (28 Nov 2007 05:47:40 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 28 Nov 2007 05:47:40 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:439741


"Giuseppe Brunello" <gbrunello3@gatech.edu> wrote in message <fihu0m
$quf$1@fred.mathworks.com>...
> I want to find between two functions f and g their common
> tangent(s). Is there a built in MatLab command that will
> take two vectors (calculated from f and g) and return the
> common tangent(s)?
---------
  If I understand you correctly, Giuseppe, your "common tangents" problem is 
equivalent to finding values for arguments, a and b, which satisfy the 
equations:

 (f(b)-g(a))/(b-a) = f'(b) = g'(a)

  I am far from being knowledgeable about the Optimization Toolbox but it 
seems to me that the 'fsolve' function therein could be used for this purpose, 
provided you have it on your computer and can compute the two derivative 
(gradient) functions, f' and g'.

  As John intimated, if you only possess f and g in the form of discrete 
vectors, you cannot expect to find precise solutions to the problem but would 
have to settle for solutions to finite difference approximations.

Roger Stafford