Curve fitting to data

조회 수: 1(최근 30일)
Emmanouil  Rachoutis
Emmanouil Rachoutis 2018년 5월 23일
편집: sloppydisk 2018년 5월 23일
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

채택된 답변

sloppydisk
sloppydisk 2018년 5월 23일
편집: sloppydisk 2018년 5월 23일
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개)

Community Treasure Hunt

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

Start Hunting!

Translated by