Data Fitting with Hyperbolic and Lorentzian Function
3 views (last 30 days)
Show older comments
Hi everyone,
I'm trying to fit my data (current through a device) at different temperatures with two models. The first one looks like this:
ft = fittype( 'a*cosh( b*(c-x) )^-2', 'independent', 'x', 'dependent', 'y' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Algorithm = 'Levenberg-Marquardt';
opts.Robust = 'Bisquare';
while the second is specified as follow (it's a Lorentzian function):
ft = fittype( 'a / (1 + ((x-b) / c)^2)', 'independent', 'x', 'dependent', 'y' );
opts = fitoptions( 'Method', 'NonlinearLeastSquares' );
opts.Robust = 'LAR';
I'm plotting the various coefficients (a, b, c) as the T increases.
I was wondering if someone could clarify me how those coeffiecients are calculated. I think the first one gets the full width of the data while the second gets the FWHM (the shape of the first function is similar to the second, but differentiates on the tail parts). This is quite relevant to me because I need to compare the two models, but the coefficients that I get so far are hardly comparable.
Thanks in advance.
3 Comments
Michael Soskind
on 23 Apr 2020
Hi Alessandro,
All of the statements you make are correct and very important to note. The temperature does in fact lead to underlying changes in the physics, particularly when looking at this topic from a spectroscopic perspective. It is a bit difficult to say whether other statistical tehcniques are necessary. From my knowledge, the most commonly used statistical parameters to extract from the fit would be the RMSE.
Something that you seem to indicate is that you are looking for something to compare these different coefficients. There are other types of norms that could be used, rather than square error, you could do an alternatively weighted error. Typically, RMSE is what I have seen when using different fitting models. Maybe something useful is the attached file. This goes through some different fit types, and shows that RMSE is the most common method for evaluating fit.
I hope this helps,
Michael
Answers (0)
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!