Azzera filtri
Azzera filtri

Problems with exp-functions

1 visualizzazione (ultimi 30 giorni)
Alexander Engman
Alexander Engman il 23 Gen 2016
Commentato: Alexander Engman il 23 Gen 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?

Risposte (1)

Walter Roberson
Walter Roberson il 23 Gen 2016
f=2*x.*exp(-x);

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by