Need to solve the equation to find ABC Values

4 views (last 30 days)
Equation:
y = A (exp(Bx)-exp(-Cx))
x=[-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5];
y=[-2.2026 -0.2981 -0.0403 -0.0055 -0.0007];
to find A B C Values

Accepted Answer

Stephan
Stephan on 12 Jul 2018
Hi,
x and y do not have the same length - if i assume, that y = -2.2026 belongs to x=-0.5 and so on you can determine the values for A, B and C as follows:
%x=[-0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5]';
x=[-0.5 -0.4 -0.3 -0.2 -0.1]';
y=[-2.2026 -0.2981 -0.0403 -0.0055 -0.0007]';
fun = fittype(@(A, B, C, x)(A.*(exp(B.*x)-exp(-C.*x))));
[fitobject,gof,output] = fit(x, y, fun)
ABC = coeffvalues(res)
This assumes that you have the Curve Fitting Toolbox.
Best regards
Stephan

More Answers (1)

Adinda
Adinda on 30 Jun 2023
Diketahui nilai dari beperapa titik sebagai berikut. Xi = 0.1, 0.2, 0.3, 0.4, 0.5 F(xi) = 0.43, 0.92, 1.47, 2.08, 2.75 Tentukan nilai turunan pertama dan kedua dari xi 0.1, 0.4, dan 0.5 menggunakan selisih maju dengan matlab

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!