How can i linearise this equation in matlab? y=a*x*e^b*x
4 views (last 30 days)
Show older comments
clc
clear all
close all
syms x y a b A B a0 a1
%given dependent and independent datas
xdata=[0.1 0.2 0.4 0.6 0.9 1.3 1.5 1.7 1.8];
ydata=[0.75 1.25 1.45 1.25 0.85 0.55 0.35 0.28 0.18];
xlim([0 2])
ylim([0 1.8])
plot(xdata,ydata,'m')
grid on
xlabel('x')
ylabel('y')
y=@(X) a*X*exp^(b*X)
Y=@(x) a0+a1*x
K=@(X) log(a)+log(X)+(b*X)
Y=log(y)
a0=ln(a1)
a1=b
x=X
2 Comments
James Tursa
on 29 Apr 2019
What is the context? I.e., what problem are you trying to solve and how do you expect "linearizing" (whatever that means in your context) to help?
Answers (1)
Alex Sha
on 30 Apr 2019
by linearization, the results are:
a: 9.66178585962543
b: -2.47330876570272
While if using nonlinear regression fitting directly, the results will be:
a 9.89736155015817
b -2.53186923697479
The method of "linearizing" is not recommended since the errors sometime are very large.
0 Comments
See Also
Categories
Find more on Systems of Nonlinear Equations 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!