Thursday, January 23, 2014

Curve Fitting with Matlab

Matlab can be used generate a function to fit your data. Example below shows how to use Matlab's built in function to curve my test data and estimate values for non-tested points.

First, save the data in an excel file and import into Matlab using File>import data as shown below


Data is saved into a local variable most likely called "untitled". Use this variable and extract your parameters. Then call cftool to start curve fitting toolbox



Curve fitting toolbox lets you decide what kind of function you'd like to use, and outputs statistical data to let you know how good the fit occurred.




The link below shows how to do this by using an older version of Matlab.

http://www.swarthmore.edu/NatSci/echeeve1/Ref/MatlabCurveFit/MatlabCftool.html
Share:

0 comments:

Post a Comment