[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: polyfit questions

From: Frank Palazzolo
Subject: RE: polyfit questions
Date: Wed, 26 Jul 2006 15:16:32 -0400

Ok, why are you using f = x .* polyval(...) instead of f = polyval(...)?

I tried doing this problem 2 ways myself, but the success of the
least-squares fit to the inverse seems very dependant on the actual
polynomial "a" used.  Can you give us an "a" vector which you believe has an
inverse in that form?


-----Original Message-----
From: address@hidden [mailto:address@hidden
On Behalf Of Georg P. Israel
Sent: Tuesday, July 25, 2006 11:37 AM
To: address@hidden
Subject: polyfit questions

Dear Octave users,

it seems that polyfit does not work for me.
This is not a software issue, but it seems that I overlook some mathematical

I do have a function of the form of a polynome:

f(x)= a0+a1*x^1+...+a6*x^6

The function gets called with x:= X^2
Hence, the actual function is of the order of 13 with all odd elements zero.

I like to find the inverse function to this function such that:

g(f(x)) = x

g(y) should be notated in the same form as f(x).
If I try to do this with a normal polynome where x:=X then the fitting works
fine. But when I try to do the same with x:=X^2 then this stuff fails
misserably. This means, the resulting approximated polynome is very much
different form the original.

Do I overlook something??

To be more specific:

x = [0:1:215];
f(x) = x .* polyval(a,x.^2);

now, I tried to find the g(y) that has the same form of a polynome as
f(x) but approximates the inverse of this function.

If I define f(x) = x .* polyval(a,x); and it's inverse similar then all
works fine. But if I use a power of two then all fails.

Has anybody an idea how to define this ???

Looking very much forward reading about some nice suggestions.

Georg P. Israel
<info at>

Help-octave mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]