From: Alex Pereira on
Hi,

I have the following data set
x = [ 1.00 0.90 0.80 0.70 0.60 0.50 0.40 0.30 0.20 0.10 0];
y = [ 1.00 1.10 1.20 1.30 1.40 1.50 1.60 1.70 1.80 1.90 2.00];
f = [ 0 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00];

How can I find an approximated function f(x,y) that best fit this data set ?

Thanks,
Alex
From: Matt J on


Why settle for an approximate when f(x,y)=1-x or f(x,y)=y-1 will give you exact fits?
From: John D'Errico on
"Alex Pereira" <alexlopespereira(a)gmail.com> wrote in message <i2fc26$3m9$1(a)fred.mathworks.com>...
> Hi,
>
> I have the following data set
> x = [ 1.00 0.90 0.80 0.70 0.60 0.50 0.40 0.30 0.20 0.10 0];
> y = [ 1.00 1.10 1.20 1.30 1.40 1.50 1.60 1.70 1.80 1.90 2.00];
> f = [ 0 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00];
>
> How can I find an approximated function f(x,y) that best fit this data set ?
>
> Thanks,
> Alex

You have insufficient information to build a model.

You data lies entirely along a straight line path in (x,y).
This makes it impossible to estimate a two dimensional
model.

Even if you did have enough information, spread out
properly in two dimensions, you have not told us what
model you would propose. Surely we cannot guess the
magic model for your arbitrary data. In fact, even for
this useless set of data that you have probably
manufactured, there are infinitely many such models
that will fit it exactly.

John
From: someone on
"Alex Pereira" <alexlopespereira(a)gmail.com> wrote in message <i2fc26$3m9$1(a)fred.mathworks.com>...
> Hi,
>
> I have the following data set
> x = [ 1.00 0.90 0.80 0.70 0.60 0.50 0.40 0.30 0.20 0.10 0];
> y = [ 1.00 1.10 1.20 1.30 1.40 1.50 1.60 1.70 1.80 1.90 2.00];
> f = [ 0 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00];
>
> How can I find an approximated function f(x,y) that best fit this data set ?
>
> Thanks,
> Alex

% You might download & try polyfitn from the MATLAB FEX at:

http://www.mathworks.com/matlabcentral/fileexchange/10065