MATLAB Matlab Function Fitting: Tips & Tricks

AI Thread Summary
Fitting data in MATLAB, particularly for exponential decay, can be challenging. Users often recommend using the `fminsearch` function for nonlinear fitting, as it allows for optimization of parameters without requiring a specific model form. Another common approach is to apply `polyfit` after transforming the data using logarithms, which can simplify the fitting process for exponential functions. It's important to ensure that the data is appropriately pre-processed to achieve accurate fitting results.
Synesthesia
Messages
12
Reaction score
0
Hello all,

How do people generally fit data in Matlab? I am trying to fit an exponential decay and it doesn't look straightforward. I am looking this up at the moment, but maybe people can give me good answers or starting points here.

Thank you!
 
Physics news on Phys.org
Think this is fminspleas
 
I usually use polyfit with the appropriate logarithms.
 

Similar threads

Replies
2
Views
1K
Replies
1
Views
2K
Replies
12
Views
4K
Replies
6
Views
5K
Replies
5
Views
3K
Back
Top