Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Two vectors different dimensions
Date: Wed, 8 Sep 2010 02:28:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <i66sbk$l88$1@fred.mathworks.com>
References: <i666ga$1u$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1283912884 21768 172.30.248.38 (8 Sep 2010 02:28:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 8 Sep 2010 02:28:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:668360

"Aaron Anstey" <elaja2@lboro.ac.uk> wrote in message <i666ga$1u$1@fred.mathworks.com>...
> I have a information for elevation (metres) along a road at certain distances from origin and also vectors for speed and power, measured at different distances.
> 
> I need to somehow link both the tables and it may mean using bins at 1-2 metre intervals or round each point up. Any hints or tips to do this would be appreciated. Distance is the only common variable between the two tables.
> Distance   Elevation
> 1.2               24
> 2.3               26
> 4.5               32  
> 
> distance  Time  Power   Speed
> 1.5            1      0.5        10
> 2 .7           2       0.7       15
> 3.2            3       0.3        16
> 
> Thanks
- - - - - - - - - -
  I would think you need the services of matlab's interp1 function.  You probably would wish to set the options so as to allow extrapolation as well as interpolation for your problem.  Read the documentation carefully to explore its possibilities.

Roger Stafford