From: Alex Pereira on 24 Jul 2010 14:40 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 24 Jul 2010 15:25 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 24 Jul 2010 15:38 "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 24 Jul 2010 15:42 "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
|
Pages: 1 Prev: duty cycle PWM Next: Counting the frequency of data in an array |