Is there a matlab command to Extract function of a plot

13 views (last 30 days)
Hello All
Sorry if this is posted before. I have attempted to search and read through as many posts as possible, to find a post that relates to my issue. Basically I have a set of x y z data, which I have managed to produce a surface and contour plot from. Now I need to generate a function that closely describes the plot that I have.
Therefore my questions is this: Is there a command or method within matlab that allows you to generate or extract the function of a plot from the x y and z data? Thank you
Kind Regards
Kush

Answers (3)

Walter Roberson
Walter Roberson on 12 Sep 2011
No, and there cannot be: there is always a (literally) infinite number of different functions that match any finite set of data.
The Curve Fitting Toolbox that Fangjun mentioned is suitable for a different situation, in which one already knows the form of the function that generated the values, and is trying to determine the coefficients that best match that general form to the data. That is (often) practical, but when one does not know the form of the function ahead of time, the data alone is not sufficient to allow you to determine the form of the function.

Fangjun Jiang
Fangjun Jiang on 12 Sep 2011

Kush
Kush on 13 Sep 2011
Hey Guys.
Thanks for the help. Its most appreciated. I will attempt to use the Curve Fitting Toolbox, as I know a rough an general form of the equation for my plot, but this only applies in 2D and I have a 3D plot. So it might be a case of resolving the two equations. Thanks again.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!