Posts from the “Matlab” Category

Fitting Curves and Surfaces to Data in MatLab

Use the curve fitting toolbox: read doc of linear and nonlinear regression for the app, functions and tutorials:

For surface fitting, all you need is raw data of the x, y, z axis. The rest can be handled by the curve fitting app or functions. The fitted model shows an equation and the value of the parameters based on the data.

Here’re the two steps to load and fit the data:

  • Fit the loaded data
    • cftool: type ‘cftool’ to open the curve fitting app
    • Select the x, y, z data just loaded
    • Select the math module to fit