Path: news.mathworks.com!not-for-mail
From: "Jose Miguel " <josemijauregui@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Interpolation with coordinates
Date: Mon, 28 May 2012 21:30:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 33
Message-ID: <jq0qov$kfb$1@newscl01ah.mathworks.com>
References: <jpvov1$ae2$1@newscl01ah.mathworks.com> <jq035b$jqr$1@newscl01ah.mathworks.com> <jq04pr$poc$1@newscl01ah.mathworks.com> <jq0a2j$ge4$1@newscl01ah.mathworks.com> <jq0kga$q8i$1@newscl01ah.mathworks.com> <jq0o5o$kri$1@speranza.aioe.org>
Reply-To: "Jose Miguel " <josemijauregui@hotmail.com>
NNTP-Posting-Host: www-00-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1338240607 20971 172.30.248.45 (28 May 2012 21:30:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 28 May 2012 21:30:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1468024
Xref: news.mathworks.com comp.soft-sys.matlab:769245

Thanks to all,

New update, I had some data wrong.
These are the coordinates of u1, u2, u3 and u4
         37.50         -2.67
         37.00         -2.67
         37.50         -2.00
         37.00         -2.00
This is the coordinates of the point: x0=37.40, y0=-2.57
u1=17.53
u2=20.37
u3=20.60
u4=16.19
The result I obtain with your equations is:
u0=18.41

I used this equation
A = (u4-u3-u2+u1)./((x2-x1).*(y3-y1));
B = (u2-u1)./(x2-x1);
C = (u3-u1)./(y3-y1);
D = u1;
serieintu = A.*(x0-x1).*(y0-y1) + B.*(x0-x1) + C.*(y0-y1) + D;
clear A B C D

Using griddata matlab function
u0=griddata([x1;x2;x3;x4],[y1;y2;y3;y4],[u1 u2 u3 u4],x0,y0,'linear')
I'm havong, u0=17.99

The difference is almost 0.5m/s which is significant,
With this code you can all run the code, thanks dpb for your help,
Any help would be very much appreciated,
Thanks
Jose