+ Reply to Thread
Results 1 to 6 of 6

Using LINEST for trig functions

  1. #1
    Registered User
    Join Date
    05-29-2012
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    3

    Using LINEST for trig functions

    Hi, please forgive I am a little bit of a newcommer to using LINEST in excel but I have now mastered using it to do a x3 polynomial regressession fit and that works fine.

    The trouble is the data I want to fit is really sinusoidal and I would like a sine function fit. I have seen some references that seem to say this is possible to do in LINEST but I do not see how to code the function instruction.

    What I want to fit is something like y= a sin(bx) + c

    Could anybody confirm that this is possible to do with LINEST and help me with how I code the function command.

    Many thanks
    Last edited by MichaelP; 05-29-2012 at 01:30 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Using LINEST for trig functions

    LINEST will only do regression that is linear in its coefficients. Your function is not linear in b.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    05-29-2012
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Using LINEST for trig functions

    Thanks shg, that clarifies.

    If I accept that I can not do the b in above formulae how would I code to cater for y= a Sin(x) + b?

    Thanks again.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Using LINEST for trig functions

    =linest(y, sin(x))

  5. #5
    Registered User
    Join Date
    05-29-2012
    Location
    Wales
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Using LINEST for trig functions

    Thanks shg, that was quick! OK as simple as that it assumes the a & b as though it were a simple linear. Many thanks I think I get the picture now.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Using LINEST for trig functions

    it assumes the a & b as though it were a simple linear.
    LINEST doesn't assume anything -- it can't tell that the values it receives are the result of a function applied.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1