Message from discussion Linear interpolation problem
Received: by 10.66.73.226 with SMTP id o2mr2945950pav.12.1352378110036;
Thu, 08 Nov 2012 04:35:10 -0800 (PST)
From: "Bruno Luong" <b.lu...@fogale.findmycountry>
Subject: Re: Linear interpolation problem
Date: Thu, 8 Nov 2012 12:35:09 +0000 (UTC)
Organization: FOGALE nanotech
References: <email@example.com> <firstname.lastname@example.org> <email@example.com>
Reply-To: "Bruno Luong" <b.lu...@fogale.findmycountry>
X-Trace: newscl01ah.mathworks.com 1352378109 28291 172.30.248.35 (8 Nov 2012 12:35:09 GMT)
NNTP-Posting-Date: Thu, 8 Nov 2012 12:35:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Content-Type: text/plain; charset=UTF-8; format=flowed
"Heinrich Acker" wrote in message <k7g16b$3j...@newscl01ah.mathworks.com>...
> Thank you, TideMan for these hints. In my application, the function is unknown, and linear approximation is already chosen for runtime reasons. With my example, I did not use real data, but wanted to illustrate the fact that the result delivered by 'interp1' is not the best result possible with linear approximation. I am looking for an algorithm that performs better with the same type of approximation. As you can see from my example, 'interp1' does not minimize the maximum error in the data set.
So what is your preference: runtime or accuracy? They are tradeoff, you have to pick a choice.
BTW, interp1 poor runtime is mainly due to the overhead, not the numerical method behind it.