Plotting the outcome of a 3D fit
Mostrar comentarios más antiguos
I have a set of data in the form [X Y Z] where X, Y and Z are column arrays. I can plot these data using scatter3. However, when I do the fit and then try to plot a surface of the fit with new Xf & Yf values in a range that is a bit beyond the original X & Y, I try this:
XYZFitCoefficinets=fit([X Y],Z,"poly22")
Xf=linspace(0,30,100)'; Yf=linspace(40,140,100)';
Zf=feval(XYZFitCoefficinets,[Xf, Yf])
I get another column array that just shows the calculated points, whereas I need a surface. I know that I need to use the surf function and turn Xf and Yf into mesh grids, but apparently it is not possible to use the feval with meshgridded X & Y. So what can i do?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spline Postprocessing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
