MATLAB Answers

Curve fitting to experimental sets of data

4 views (last 30 days)
Tomazc on 25 Feb 2011
Dear all,
I have experimental data, where more sets of data of the same process were collected (Example figure can be seen: )
Now I would like to fit curve (probably with splines) in Matlab, which would be optimized to all sets of data.
I know how to fit curve with “Matlab Curve Fitting Tool” to one data set, but I don’t know how to do it with more sets.
Can you please give me some guidelines how to solve problem.
Thank you in advance, Tomaz

Answers (1)

Richard Willey
Richard Willey on 25 Feb 2011
1. Start by using the Curve Fitting Tool to fit one of your data sets.
2. Select "Generate Code" from the file menu. This will automatically create a MATLAB function that will replicate the precise analysis that you performed with cftool.
3. Test the MATLAB function on your original dataset and make sure that you're happy with the output.
4. Use a loop to apply your function to all of the additional data sets.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by