From: patrik osgnach on 10 Mar 2010 02:43 Hi, is there a way to do an hyperbolic interpolation in matlab? i mean, i have some data and i know that a function like f(x)=c*x^-a fits my data very good. how can i find such a?
From: Torsten Hennig on 9 Mar 2010 16:59 > Hi, is there a way to do an hyperbolic interpolation > in matlab? i mean, i have some data and i know that a > function like f(x)=c*x^-a fits my data very good. how > can i find such a? Create a matrix A with rows [1 -log(x_i)] and a vector b with elements log(y(i)) where (x(i),y(i)) are the data to be approximated. Then set p=A\b ; exp(p(1)) = c and p(2)=a in your equation above. I linearized your equation f(x)=c*x^(-a) by taking log on both sides ; if it is necessary to make a nonlinear fit in the parameters, look for lsqnonlin or lsqcurvefit. Best wishes Torsten.
From: patrik osgnach on 10 Mar 2010 10:56 Torsten Hennig <Torsten.Hennig(a)umsicht.fhg.de> wrote in message <117634534.354860.1268207989229.JavaMail.root(a)gallium.mathforum.org>... > > Hi, is there a way to do an hyperbolic interpolation > > in matlab? i mean, i have some data and i know that a > > function like f(x)=c*x^-a fits my data very good. how > > can i find such a? > > Create a matrix A with rows [1 -log(x_i)] how many rows? are the rows to be all equal?
From: Torsten Hennig on 10 Mar 2010 01:26 > Torsten Hennig <Torsten.Hennig(a)umsicht.fhg.de> wrote > in message > <117634534.354860.1268207989229.JavaMail.root(a)gallium. > mathforum.org>... > > > Hi, is there a way to do an hyperbolic > interpolation > > > in matlab? i mean, i have some data and i know > that a > > > function like f(x)=c*x^-a fits my data very good. > how > > > can i find such a? > > > > Create a matrix A with rows [1 -log(x_i)] > how many rows? are the rows to be all equal? If (x(i),y(i)) are your measured data to be fitted (i=1,...,n), create a matrix with n rows and 2 columns where the rows have the form [1 -log(x(i)]. Best wishes Torsten.
From: patrik osgnach on 10 Mar 2010 15:21 > > If (x(i),y(i)) are your measured data to be fitted > (i=1,...,n), create a matrix with n rows and 2 columns > where the rows have the form [1 -log(x(i)]. > ah, ok. I misunderstood that [1 -log(x(i))] now it works, thank you very much
|
Pages: 1 Prev: two's complement 8 bit data to decimal Next: how to create mask |