Is there a way to extract data from surface graphics in the curvefitting toolbox?
5 views (last 30 days)
Show older comments
Hello to all
I'm doing some interpolation problems using curve fitting toolbox.
I would like to know if there is any way to extract the x, y z of the surface graphic that appear in the curve fitting window?
Thank you
Pedro
3 Comments
Walter Roberson
on 15 Feb 2019
Tomorrow I will do some testing on how to extract the exact information . It will not be easy as it involves undocumented graphics containers if I recall correctly .
Answers (3)
Walter Roberson
on 17 Feb 2019
Experimenting, I find:
s = findall(groot,'tag','curvefit.gui.FunctionSurface');
x = s.XData;
y = s.YData;
z = s.ZData;
0 Comments
Pedro Pinto
on 17 Feb 2019
1 Comment
Walter Roberson
on 17 Feb 2019
With that data, the code I posted works for me, both versions -- doing the findall() after the createFit1 routine has returned, or taking h(1) of the h = plot() handle in the createFit1 routine.
The x, y, and z values that are extracted are all 51 x 49, and you can surf(x, y, z) to reconstruct the plotted surface.
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!