surface fitting -凯发k8网页登录

main content

surface fitting

interactive surface fitting

to interactively fit a surface, follow the steps in this simple example:

  1. load some data at the matlab® command line.

    load franke
  2. open the curve fitter app.

    curvefitter
  3. in the curve fitter app, on the curve fitter tab, in the data section, click select data. in the select fitting data dialog box, select x, y, and z as the x data, y data, and z data values, respectively.

    the curve fitter app creates a default interpolation fit to the data.

  4. choose a different model type from the fit gallery in the fit type section of the curve fitter tab.

  5. in the fit options pane, try different fit options for your chosen model type.

  6. in the export section, click export and select generate code.

    the curve fitter app creates a file in the editor containing matlab code to recreate the currently selected fit and its opened plots in your interactive session.

for more information about fitting surfaces in the curve fitter app, see interactive curve and surface fitting.

programmatic surface fitting

to programmatically fit a surface, follow the steps in this simple example:

  1. load some data.

    load franke
  2. create a fit using the fit function, specifying the variables and a model type (in this case poly23 is the model type).

     f = fit([x y],z,"poly23")
  3. plot your fit and the data.

    plot(f,[x y],z)

to learn what functions you can use to create and work with fits, see .

see also

|

related topics

网站地图