Filter löschen
Filter löschen

Curve fitting to data

2 Ansichten (letzte 30 Tage)
Emmanouil  Rachoutis
Emmanouil Rachoutis am 23 Mai 2018
Bearbeitet: sloppydisk am 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

Akzeptierte Antwort

sloppydisk
sloppydisk am 23 Mai 2018
Bearbeitet: sloppydisk am 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)

Weitere Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by