Filter löschen
Filter löschen

Problems with exp-functions

1 Ansicht (letzte 30 Tage)
Alexander Engman
Alexander Engman am 23 Jan. 2016
Kommentiert: Alexander Engman am 23 Jan. 2016
Hi!
I want to make a function of x.
This is my code:
x=(0:0.001:5); %x-values
f=2*x*exp(-x);
plot(x,f)
But MatLab is telling me:
Error using *
Inner matrix dimensions must agree.
What does this mean in this case and how do I solve it?

Antworten (1)

Walter Roberson
Walter Roberson am 23 Jan. 2016
f=2*x.*exp(-x);

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by