Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Curve fitting and Plane fitting

  1. Jun 6, 2012 #1
    If I have a set of n numbers, (n=0,1,2, ... n-1), what is the maximum number coefficients in a series I would need in order to find y=f(n) true on the integers up to n-1? Or is that something I just have to check after fitting it? ( does it need an nth degree polynomial?)

    Another question:

    If I have a finite set of functions, Ft(x), and these functions may or may not be similar (i.e. Ft(x) = x, x2, x3... xt ), how can I fit a plane to a set of functions such that F(1,x)=F1(x), F(2,x)=F2(x) ... in order to find an equation F(t,x)?

    can/how is this done if each function is a summation? (i.e. F1=[itex]\sum[/itex]a1(n)*xn, F2=[itex]\sum[/itex]a2(n)*xn)

    can I find an equation like F(t,x) = [itex]\sum[/itex]G(t)*at(n)*xn that will satisfy this?

  2. jcsd
  3. Jun 6, 2012 #2
    For the first question, n points uniquely identifies a degree n-1 polynomial, which will have n coefficients.

    As for your second question I'm not sure but it really depends on the inputs ##F_t## if it's possible to write ##F## in a closed form. If I'm reading you correctly, you want to construct a function based on level set information. Interesting question and I'd like to see what others have to say on this.
  4. Jun 7, 2012 #3
    If anyone is interested, the problem I'm trying to solve is this:

    say we have an NxN (3x3 for this example) matrix that changes over time t. say we have 3 different frames, 1 NxN matrix representing the value of each pixel in a screen for each frame. so 3 matrices total

    If I count from left to right and down across the matrix, for a 3x3 matrix, the last (bottom right pixel) will be number 9. in mod 3 (or mod N) , the value is 33 or (NN), which is also the coordinates of the pixel (omitting the single values like 01, 02, 03 by adding 3 (N) ).

    matrix numbered as:
    |1 2 3 | --> | 11 12 13 |
    |4 5 6 | --> | 21 22 23 |
    |7 8 9 | --> | 31 32 33 |

    So I want to take the values in the matrix and make a set {a1,a2,a3....a9}
    and fit a function to them, F1(x), which is no problem so far.
    And do the same for each frame, so that I have a function for each frame, F1(x), F2(x), F3(x). no problem this far.

    Now comes the problem: I want to combine these functions together so that I can find any pixel's value by entering the time, t, and the pixel number, x. So that Ft(x) can be given by F(t,x).

    that's where if F1 = [itex]\sum [/itex] a(n)*xn and F2 = [itex]\sum [/itex] b(n)*xn and similarly for F3
    can they be combined somehow into a function F(t,x) such as [itex]\sum[/itex] G(t)*Z(n)*xn
    so that G(1)*Z(n) gives a(n), and G(2)*Z(n) = b(n) and so forth ?
    How can I solve for what G(t) and Z(n) are? or is it possible?

    The point is to be able to have an animation or video be in a formula, and not need so much data to transfer. the quality I believe would depend on the expansion of n, taking n out to infinity would produce perfect quality.

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook