How can i linearise this equation in matlab? y=a*x*e^b*x
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
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?
Réponses (1)
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.
0 commentaires
Voir également
Catégories
En savoir plus sur Conversion Between Symbolic and Numeric dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!