How can i linearise this equation in matlab? y=a*x*e^b*x

3 vues (au cours des 30 derniers jours)
Burhan Elaldi
Burhan Elaldi le 29 Avr 2019
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 commentaires
Rik
Rik le 29 Avr 2019
This time I edited your question for you. Next time, please use the tools explained on this page to make your question more readable.
Also, what do you mean exactly by 'linearizing'? Have a read here. It will greatly improve your chances of getting an answer.
James Tursa
James Tursa le 29 Avr 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?

Connectez-vous pour commenter.

Réponses (1)

Alex Sha
Alex Sha le 30 Avr 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.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by