Curve fitting to data
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Emmanouil Rachoutis
le 23 Mai 2018
Modifié(e) : sloppydisk
le 23 Mai 2018
Hi all!
I would like to find the best fit of the curve that you can see in the picture attached with data from measurements. The curve is described by the equation: A*(1-phi)*heta*exp(-0.67*heta^1.5), where phi is just a known number and heta is a known vector. The only unknown variable is A, the value of which I would like to estimate after the curve fitting.
I've been trying to use gauss1 fit and solve the equation for A but the value of A that I get is not the expected one. Do you have any other ideas?
I thank you in advance!
Cheers, Manolis
0 commentaires
Réponse acceptée
sloppydisk
le 23 Mai 2018
Modifié(e) : sloppydisk
le 23 Mai 2018
What you are looking for is just a linear fit to your exponential function, you can do this by using the mldivide operator "\".
phi = 2;
n = 100;
theta = (1:n)'/n;
f = (1-phi)*theta.*exp(-0.67*theta.^1.5);
fOfA = @(A) A*f;
measureddata = fOfA(2)+.05*rand(n, 1);
coeff = f\measureddata;
plot(theta, measureddata, theta, coeff*f)
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Interpolation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!