From: "Jose Miguel " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Interpolation with coordinates
Date: Tue, 29 May 2012 10:03:06 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 34
Message-ID: <jq26sq$a5f$>
References: <jpvov1$ae2$> <jq035b$jqr$> <jq04pr$poc$> <jq0a2j$ge4$> <jq0kga$q8i$> <jq0sfb$qov$>
Reply-To: "Jose Miguel " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1338285786 10415 (29 May 2012 10:03:06 GMT)
NNTP-Posting-Date: Tue, 29 May 2012 10:03:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1468024
Xref: comp.soft-sys.matlab:769287

"Roger Stafford" wrote in message <jq0sfb$qov$>...
> "Jose Miguel " <> wrote in message <jq0kga$q8i$>...
> > I'm having though slightly different results than the ones obtained with matlab function griddada (I had to do an iteration for each row, so it was not an option).
> > .........
> > u0=18.44
> > With the matlab griddata function I obtained:
> > u0=18.46
> > ........
> > v0=-10.24
> > With the matlab griddata function I obtained:
> > v0=-8.38
> - - - - - - - -
>   On my computer I get:
>  u0 =  18.40428891377374
>  v0 = -10.41063829787234
> for the two bilinear results using my formulas, and these differ from yours somewhat.  You should really get these same results if you use precisely the same values you quoted.  I suspect the values you quoted are only the displayed values to four decimal places of those you actually used.  Am I right?  Remember, what you see displayed using 'format short' is not exactly the quantity being used but only its value rounded to four decimal places.
>   As for the 'griddata' results, Mathworks states that the default interpolation method used is "Triangle-based linear interpolation" which I believe you will find is not the same as bilinear four-point interpolation, and that probably accounts for the differences you see.
> Roger Stafford

Dear Roger,

It works perfectly, thank you very much,
I had a wrong data that was causing tricky things, but now it gives the same results as you (taking into account what you said about decimal places).

Could you please tell me the paper, theorem or where I can find the explanation and equations you told me? (it's to include it in the matlab routine and don't forget about it!, otherwise in 2-3 months I will not know how this was done)

My mail is
Thank you very much,