Path: news.mathworks.com!not-for-mail
From: "Jose Miguel " <josemijauregui@hotmail.com>
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$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> <jq0sfb$qov$1@newscl01ah.mathworks.com>
Reply-To: "Jose Miguel " <josemijauregui@hotmail.com>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1338285786 10415 172.30.248.35 (29 May 2012 10:03:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 29 May 2012 10:03:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1468024
Xref: news.mathworks.com comp.soft-sys.matlab:769287

"Roger Stafford" wrote in message <jq0sfb$qov$1@newscl01ah.mathworks.com>...
> "Jose Miguel " <josemijauregui@hotmail.com> wrote in message <jq0kga$q8i$1@newscl01ah.mathworks.com>...
> > 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 josemijauregui@hotmail.com
Thank you very much,
Regards
Jose