How do I fit a non linear curve? The Next CEO of Stack OverflowOil drop experiment--How was the result so accurate?How does the Double Slit Experiment work in detail?Curve Fitting and Multiple ExperimentsFitting an exponential when values are negative (while taking error into account)Power fit to some experimental dataDamped Harmonic Curve fit and ForceConstant wind drag while falling?Non-linear graph getting from an experiment finding the enthalpy of vaporization of LNPeriodic, linear increase in photon countsWhat is the scientific method for finding a theoretical explanation for experimental data?

Lucky Feat: How can "more than one creature spend a luck point to influence the outcome of a roll"?

What was Carter Burkes job for "the company" in "Aliens"?

Do scriptures give a method to recognize a truly self-realized person/jivanmukta?

Iterate through multiline string line by line

What was the first Unix version to run on a microcomputer?

How to set page number in right side in chapter title page?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Is it professional to write unrelated content in an almost-empty email?

How to find image of a complex function with given constraints?

Can I board the first leg of the flight without having final country's visa?

When "be it" is at the beginning of a sentence, what kind of structure do you call it?

what's the use of '% to gdp' type of variables?

0-rank tensor vs vector in 1D

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Calculate the Mean mean of two numbers

Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?

What is the difference between Statistical Mechanics and Quantum Mechanics

New carbon wheel brake pads after use on aluminum wheel?

Reference request: Grassmannian and Plucker coordinates in type B, C, D

Inexact numbers as keys in Association?

How to get the last not-null value in an ordered column of a huge table?

Is "three point ish" an acceptable use of ish?

Decide between Polyglossia and Babel for LuaLaTeX in 2019

Can you teleport closer to a creature you are Frightened of?



How do I fit a non linear curve?



The Next CEO of Stack OverflowOil drop experiment--How was the result so accurate?How does the Double Slit Experiment work in detail?Curve Fitting and Multiple ExperimentsFitting an exponential when values are negative (while taking error into account)Power fit to some experimental dataDamped Harmonic Curve fit and ForceConstant wind drag while falling?Non-linear graph getting from an experiment finding the enthalpy of vaporization of LNPeriodic, linear increase in photon countsWhat is the scientific method for finding a theoretical explanation for experimental data?










1












$begingroup$


In an experiment that I did, i collected data points $ (ω,υ(ω))$ that are modeled by the equation:



$$ υ(ω)=fracωCsqrt(ω^2-ω_0^2)^2+γ^2ω^2$$



How can do I fit a curve here ? and how can I extract $γ$ through this process ?










share|cite|improve this question









$endgroup$







  • 2




    $begingroup$
    Rearrange it into equations that can be plotted easily and that have coefficients which can be extracted easily(such as straight lines, log-log etc). Make the plots work for you not the other way around d.
    $endgroup$
    – Jake Rose
    2 hours ago











  • $begingroup$
    At the most basic level you simply put different values of $C, omega_0, gamma$ until you get a curve that looks like your data. Practically this is done with software, for example R, matlab, and mathematica.
    $endgroup$
    – KF Gauss
    2 hours ago











  • $begingroup$
    Is there a mathematical way (just as we derive the linear regression formula) to derive a curve for this case ?
    $endgroup$
    – Andreas Mastronikolis
    2 hours ago











  • $begingroup$
    As KG Gauss says, the equation you've given is the equation that should be fitted to the data points. This will need to be done numerically.
    $endgroup$
    – lemon
    2 hours ago















1












$begingroup$


In an experiment that I did, i collected data points $ (ω,υ(ω))$ that are modeled by the equation:



$$ υ(ω)=fracωCsqrt(ω^2-ω_0^2)^2+γ^2ω^2$$



How can do I fit a curve here ? and how can I extract $γ$ through this process ?










share|cite|improve this question









$endgroup$







  • 2




    $begingroup$
    Rearrange it into equations that can be plotted easily and that have coefficients which can be extracted easily(such as straight lines, log-log etc). Make the plots work for you not the other way around d.
    $endgroup$
    – Jake Rose
    2 hours ago











  • $begingroup$
    At the most basic level you simply put different values of $C, omega_0, gamma$ until you get a curve that looks like your data. Practically this is done with software, for example R, matlab, and mathematica.
    $endgroup$
    – KF Gauss
    2 hours ago











  • $begingroup$
    Is there a mathematical way (just as we derive the linear regression formula) to derive a curve for this case ?
    $endgroup$
    – Andreas Mastronikolis
    2 hours ago











  • $begingroup$
    As KG Gauss says, the equation you've given is the equation that should be fitted to the data points. This will need to be done numerically.
    $endgroup$
    – lemon
    2 hours ago













1












1








1





$begingroup$


In an experiment that I did, i collected data points $ (ω,υ(ω))$ that are modeled by the equation:



$$ υ(ω)=fracωCsqrt(ω^2-ω_0^2)^2+γ^2ω^2$$



How can do I fit a curve here ? and how can I extract $γ$ through this process ?










share|cite|improve this question









$endgroup$




In an experiment that I did, i collected data points $ (ω,υ(ω))$ that are modeled by the equation:



$$ υ(ω)=fracωCsqrt(ω^2-ω_0^2)^2+γ^2ω^2$$



How can do I fit a curve here ? and how can I extract $γ$ through this process ?







experimental-physics experimental-technique






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked 2 hours ago









Andreas MastronikolisAndreas Mastronikolis

545




545







  • 2




    $begingroup$
    Rearrange it into equations that can be plotted easily and that have coefficients which can be extracted easily(such as straight lines, log-log etc). Make the plots work for you not the other way around d.
    $endgroup$
    – Jake Rose
    2 hours ago











  • $begingroup$
    At the most basic level you simply put different values of $C, omega_0, gamma$ until you get a curve that looks like your data. Practically this is done with software, for example R, matlab, and mathematica.
    $endgroup$
    – KF Gauss
    2 hours ago











  • $begingroup$
    Is there a mathematical way (just as we derive the linear regression formula) to derive a curve for this case ?
    $endgroup$
    – Andreas Mastronikolis
    2 hours ago











  • $begingroup$
    As KG Gauss says, the equation you've given is the equation that should be fitted to the data points. This will need to be done numerically.
    $endgroup$
    – lemon
    2 hours ago












  • 2




    $begingroup$
    Rearrange it into equations that can be plotted easily and that have coefficients which can be extracted easily(such as straight lines, log-log etc). Make the plots work for you not the other way around d.
    $endgroup$
    – Jake Rose
    2 hours ago











  • $begingroup$
    At the most basic level you simply put different values of $C, omega_0, gamma$ until you get a curve that looks like your data. Practically this is done with software, for example R, matlab, and mathematica.
    $endgroup$
    – KF Gauss
    2 hours ago











  • $begingroup$
    Is there a mathematical way (just as we derive the linear regression formula) to derive a curve for this case ?
    $endgroup$
    – Andreas Mastronikolis
    2 hours ago











  • $begingroup$
    As KG Gauss says, the equation you've given is the equation that should be fitted to the data points. This will need to be done numerically.
    $endgroup$
    – lemon
    2 hours ago







2




2




$begingroup$
Rearrange it into equations that can be plotted easily and that have coefficients which can be extracted easily(such as straight lines, log-log etc). Make the plots work for you not the other way around d.
$endgroup$
– Jake Rose
2 hours ago





$begingroup$
Rearrange it into equations that can be plotted easily and that have coefficients which can be extracted easily(such as straight lines, log-log etc). Make the plots work for you not the other way around d.
$endgroup$
– Jake Rose
2 hours ago













$begingroup$
At the most basic level you simply put different values of $C, omega_0, gamma$ until you get a curve that looks like your data. Practically this is done with software, for example R, matlab, and mathematica.
$endgroup$
– KF Gauss
2 hours ago





$begingroup$
At the most basic level you simply put different values of $C, omega_0, gamma$ until you get a curve that looks like your data. Practically this is done with software, for example R, matlab, and mathematica.
$endgroup$
– KF Gauss
2 hours ago













$begingroup$
Is there a mathematical way (just as we derive the linear regression formula) to derive a curve for this case ?
$endgroup$
– Andreas Mastronikolis
2 hours ago





$begingroup$
Is there a mathematical way (just as we derive the linear regression formula) to derive a curve for this case ?
$endgroup$
– Andreas Mastronikolis
2 hours ago













$begingroup$
As KG Gauss says, the equation you've given is the equation that should be fitted to the data points. This will need to be done numerically.
$endgroup$
– lemon
2 hours ago




$begingroup$
As KG Gauss says, the equation you've given is the equation that should be fitted to the data points. This will need to be done numerically.
$endgroup$
– lemon
2 hours ago










3 Answers
3






active

oldest

votes


















2












$begingroup$

What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.



The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.



Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.






share|cite|improve this answer









$endgroup$




















    1












    $begingroup$

    Don't try using any general-purpose curve fitting algorithm for this.



    The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.



    If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.



    When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.



    In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.



    Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html






    share|cite|improve this answer











    $endgroup$




















      0












      $begingroup$

      Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:



      $$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$



      You can write this in matrix form as:



      $$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$



      This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.



      More information on polynomial regression on the wikipedia page.






      share|cite|improve this answer








      New contributor




      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      $endgroup$












      • $begingroup$
        The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
        $endgroup$
        – Andreas Mastronikolis
        1 hour ago










      • $begingroup$
        Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
        $endgroup$
        – Anon1759
        1 hour ago











      Your Answer





      StackExchange.ifUsing("editor", function ()
      return StackExchange.using("mathjaxEditing", function ()
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      );
      );
      , "mathjax-editing");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "151"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fphysics.stackexchange.com%2fquestions%2f469754%2fhow-do-i-fit-a-non-linear-curve%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2












      $begingroup$

      What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.



      The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.



      Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.






      share|cite|improve this answer









      $endgroup$

















        2












        $begingroup$

        What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.



        The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.



        Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.






        share|cite|improve this answer









        $endgroup$















          2












          2








          2





          $begingroup$

          What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.



          The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.



          Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.






          share|cite|improve this answer









          $endgroup$



          What you want to find is the parameters $theta=(C, omega_0, gamma)$ that minimizes the difference between $nu(omega|theta)$ (the curve given the parameters) and the measured $nu_i$ values.



          The most popular method is least mean square fitting, which minimizes the sum of the squares of the differences. One can also do it by formulating the normal equations and solve it as a (potentially big) linear equation system. Another approach is the Gauss-Newton algorithm, a simple iterative method to do it. It is a good exercise to implement the solution oneself, but once you have done it once or twice it is best to rely on some software package.



          Note that this kind of fitting works well when you know the functional form (your equation for $nu(omega)$), since you can ensure only that the parameters that matter are included. If you try to fit some general polynomial or function you can get overfitting (some complex curve that fits all the data but has nothing to do with your problem) besides the problem of identifying the parameters you care about.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered 1 hour ago









          Anders SandbergAnders Sandberg

          9,88521429




          9,88521429





















              1












              $begingroup$

              Don't try using any general-purpose curve fitting algorithm for this.



              The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.



              If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.



              When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.



              In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.



              Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html






              share|cite|improve this answer











              $endgroup$

















                1












                $begingroup$

                Don't try using any general-purpose curve fitting algorithm for this.



                The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.



                If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.



                When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.



                In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.



                Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html






                share|cite|improve this answer











                $endgroup$















                  1












                  1








                  1





                  $begingroup$

                  Don't try using any general-purpose curve fitting algorithm for this.



                  The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.



                  If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.



                  When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.



                  In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.



                  Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html






                  share|cite|improve this answer











                  $endgroup$



                  Don't try using any general-purpose curve fitting algorithm for this.



                  The form of your function looks like a frequency response function, with the two unknown parameters $omega_0$ and $gamma$ - i.e. the resonant frequency, and the damping parameter. The function you specified omits an important feature if this is measured data, namely the relative phase between the "force" driving the oscillation and the response.



                  If you didn't measure the phase at each frequency, repeat the experiment, because that is critical information.



                  When you have the amplitude and phase data, there are curve fitting techniques devised specifically for this problem of "system identification" in experimental modal analysis. A simple one is the so-called "circle fitting" method. If you make a Nyquist plot of your measured data (i.e. plot imaginary part of the response against the real part), the section of the curve near the resonance is a circle, and you can fit a circle to the measured data and find the parameters from it.



                  In practice, a simplistic approach assuming the system only has one resonance often doesn't work well, because the response of a real system near resonance also includes the off-resonance response to all the other vibration modes. If the resonant frequencies are well separated and lightly damped, it is possible to correct for this while fitting "one mode at a time". If this is not the case, you need methods that can identify several resonances simultaneously from one response function.



                  Rather than re-invent the wheel, use existing code. The signal processing toolbox in MATLAB would be a good starting point - for example https://uk.mathworks.com/help/signal/ref/modalfit.html







                  share|cite|improve this answer














                  share|cite|improve this answer



                  share|cite|improve this answer








                  edited 1 hour ago

























                  answered 1 hour ago









                  alephzeroalephzero

                  5,58621120




                  5,58621120





















                      0












                      $begingroup$

                      Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:



                      $$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$



                      You can write this in matrix form as:



                      $$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$



                      This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.



                      More information on polynomial regression on the wikipedia page.






                      share|cite|improve this answer








                      New contributor




                      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      $endgroup$












                      • $begingroup$
                        The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
                        $endgroup$
                        – Andreas Mastronikolis
                        1 hour ago










                      • $begingroup$
                        Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
                        $endgroup$
                        – Anon1759
                        1 hour ago















                      0












                      $begingroup$

                      Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:



                      $$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$



                      You can write this in matrix form as:



                      $$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$



                      This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.



                      More information on polynomial regression on the wikipedia page.






                      share|cite|improve this answer








                      New contributor




                      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      $endgroup$












                      • $begingroup$
                        The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
                        $endgroup$
                        – Andreas Mastronikolis
                        1 hour ago










                      • $begingroup$
                        Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
                        $endgroup$
                        – Anon1759
                        1 hour ago













                      0












                      0








                      0





                      $begingroup$

                      Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:



                      $$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$



                      You can write this in matrix form as:



                      $$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$



                      This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.



                      More information on polynomial regression on the wikipedia page.






                      share|cite|improve this answer








                      New contributor




                      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      $endgroup$



                      Are you looking for something like polynomial regression? The general idea is, if you have measured pairs of (x, y(x)) and you are looking for find a fit of the form:



                      $$y = alpha_0 + alpha_1 x + alpha_2 x^2 ...$$



                      You can write this in matrix form as:



                      $$beginbmatrix y_1 \ y_2 \ y_3 \ vdots \ y_n endbmatrix = beginbmatrix 1 & x_1 & x_1^2 & cdots \ 1 & x_2 & x_2^2 & cdots \ 1 & x_3 & x_3^2 & cdots \ vdots & vdots & vdots & vdots \ 1 & x_n &x_n^2 & cdots endbmatrix beginbmatrix beta_0 \ beta_1 \ beta_2 \ vdots \ beta_m endbmatrix$$



                      This can now be solved for your coefficients, $beta_i$. That being said, and as was hinted at in your comments, I've never actually done this, and have instead used non-linear fitting functions provided by libraries.



                      More information on polynomial regression on the wikipedia page.







                      share|cite|improve this answer








                      New contributor




                      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      share|cite|improve this answer



                      share|cite|improve this answer






                      New contributor




                      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.









                      answered 1 hour ago









                      Anon1759Anon1759

                      412




                      412




                      New contributor




                      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.





                      New contributor





                      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.






                      Anon1759 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                      Check out our Code of Conduct.











                      • $begingroup$
                        The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
                        $endgroup$
                        – Andreas Mastronikolis
                        1 hour ago










                      • $begingroup$
                        Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
                        $endgroup$
                        – Anon1759
                        1 hour ago
















                      • $begingroup$
                        The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
                        $endgroup$
                        – Andreas Mastronikolis
                        1 hour ago










                      • $begingroup$
                        Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
                        $endgroup$
                        – Anon1759
                        1 hour ago















                      $begingroup$
                      The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
                      $endgroup$
                      – Andreas Mastronikolis
                      1 hour ago




                      $begingroup$
                      The answer is yes if the equation can be reduced to a polynomial one. I don't think it can be though.
                      $endgroup$
                      – Andreas Mastronikolis
                      1 hour ago












                      $begingroup$
                      Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
                      $endgroup$
                      – Anon1759
                      1 hour ago




                      $begingroup$
                      Then I think your only choice is to follow the advice as given in Anders Sandberg's answer and use one of the fitting techniques suggested there.
                      $endgroup$
                      – Anon1759
                      1 hour ago

















                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Physics Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fphysics.stackexchange.com%2fquestions%2f469754%2fhow-do-i-fit-a-non-linear-curve%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Era Viking Índice Início da Era Viquingue | Cotidiano | Sociedade | Língua | Religião | A arte | As primeiras cidades | As viagens dos viquingues | Viquingues do Oeste e Leste | Fim da Era Viquingue | Fontes históricas | Referências Bibliografia | Ligações externas | Menu de navegação«Sverige då!»«Handel I vikingetid»«O que é Nórdico Antigo»Mito, magia e religião na volsunga saga Um olhar sobre a trajetória mítica do herói sigurd«Bonden var den verklige vikingen»«Vikingatiden»«Vikingatiden»«Vinland»«Guerreiras de Óðinn: As Valkyrjor na Mitologia Viking»1519-9053«Esculpindo símbolos e seres: A arte viking em pedras rúnicas»1679-9313Historia - Tema: VikingarnaAventura e Magia no Mundo das Sagas IslandesasEra Vikinge

                      What's the metal clinking sound at the end of credits in Avengers: Endgame?What makes Thanos so strong in Avengers: Endgame?Who is the character that appears at the end of Endgame?What happens to Mjolnir (Thor's hammer) at the end of Endgame?The People's Ages in Avengers: EndgameWhat did Nebula do in Avengers: Endgame?Messing with time in the Avengers: Endgame climaxAvengers: Endgame timelineWhat are the time-travel rules in Avengers Endgame?Why use this song in Avengers: Endgame Opening Logo Sequence?Peggy's age in Avengers Endgame

                      Are there legal definitions of ethnicities/races? The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Legal definitions in the United StatesAre there truly legal limits on US interest rates?Are gender identity and sexual orientation federally protected?Why is there an apparent legal bias against digital services?What limits are there to the powers of individual judges in the United States legal system?Are women only scholarships legal under Irish / EU law?Is the term “race” defined by Public Law enacted by Congress of the United StatesIs there a legal definition of race in the US?Neighbors are spying for landlord on Renters is it legal?Are Protected Classes Bi-directional?