# How to solve exponential equation to find unknown constants

14 ビュー (過去 30 日間)
Nidhi 2021 年 8 月 8 日
コメント済み: Nidhi 2021 年 8 月 8 日
I am trying to find the values of the constants a, b and c from the exponential equation. The data points of x and t needs to be exported from an excel file(given) . I have tried solving it using lsqcurvefit but I am facing problem in finding the initial values of the parameters to solve the problem.
The equation is Here, x and t are variables. The value of y is constant and equal to 6.

サインインしてコメントする。

### 採用された回答

J. Alex Lee 2021 年 8 月 8 日
Alternatively, based on my reparameterization above you can as a first pass say everything after looks like saturation, take the average, and declare
mask = data.t < 4;
F = 157.1525
Now you can linearize the problem and say To visualize
z = log(F-data.x);
plot(data.t,z,'.')
Warning: Imaginary parts of complex X and/or Y arguments ignored.
hold on
As expected, the plot is pretty linear for , so you can do a linear fit and visualize
lf = 1×2
-1.3886 1.7279
plot(data.t,polyval(lf,data.t),'-') Then convert the linear fit parameters back to H = -lf(1)
H = 1.3886
G = exp(lf(2))
G = 5.6287
And then you're back to the algebra to get back to . This procedure, which now only relies on observing the saturation behavior, results in
figure
plot(data.t,data.x,'.')
hold on
plot(data.t,F - G*exp(-H*data.t),'-') ##### 3 件のコメント表示非表示 2 件の古いコメント
Nidhi 2021 年 8 月 8 日
@J. Alex Lee I understood how to find the values now. Thank you so much once again!

サインインしてコメントする。

### その他の回答 (1 件)

J. Alex Lee 2021 年 8 月 8 日
Do you have an intuition of what the graph of looks like? Hint: it looks like your plot, scaled and shifted roughly only in the y direction, so roughly whatever appears in front of t in the exponential is roughly unity. Next step, simplify your parameterization a bit so you can intuitively scale and shift...say That makes it even easier to see the link between your data. At , and at  , so the scale factor and shift factor is .
Now it's an algebra problem to get from to .

サインインしてコメントする。

### Community Treasure Hunt

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

Start Hunting!