1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fitting a function in mathematica

  1. May 22, 2012 #1
    Say I have a function:

    f(x,y)

    I have values for f and y such that I can make a plot of f vs y... however, from the values of f and y, I am interested in finding what x is. The x value should be a constant that is optimized to fit the f vs y graph.

    Is there a way I can do this in mathematica?

    Thank you for any advice!
     
  2. jcsd
  3. May 24, 2012 #2
    Okay, I'm a bit confused by your problem.

    you mean, taking a specific example, for instance [itex]f(x,y)=(xy)^3[/itex]? Then, if you know for instance f(x,y)=14 and y=pi/2, that x should be [itex]\frac{14^{1/3}}{pi/2}[/itex]. Using that you can then see that [itex]f(x,y)=f(y)=(\frac{14^{1/3}}{pi/2} y)^3[/itex]. Trying the mathematica functions Solve and Plot should get you on your way.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Fitting a function in mathematica
  1. Fitting function (Replies: 2)

Loading...