How can I write this equation in matlab ?

and how can I linearise this function ?

3 Kommentare

You need to review the documentation section on: Getting Started (link). Also see the documentation for Anonymous Functions (link).
Coding your function (as an anonymous function) is straightforward:
y = @(x) a*x.*exp(b*x);
assuming α and β are scalars.
To call it:
a = 1;
b = 2;
x = 0.1:10;
y = @(x) a*x.*exp(b*x);
ye = y(x);
This should get you started.
Hüseyin YILDIZ
Hüseyin YILDIZ am 6 Mai 2019
Thanks for your answer.How can I apply ln(y)?
a.PNG
Walter Roberson
Walter Roberson am 6 Mai 2019
You would need to use the symbolic toolbox to construct an equation and apply log to each of the sides.
Generally you would not do that. Instead you would create a variable to store log(y) and a different variable to hold log of the right hand side.

Antworten (0)

Diese Frage ist geschlossen.

Produkte

Version

R2016a

Gefragt:

am 6 Mai 2019

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by