Problems with exp-functions
Mostrar comentarios más antiguos
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?
Respuestas (1)
Walter Roberson
el 23 de En. de 2016
f=2*x.*exp(-x);
1 comentario
Alexander Engman
el 23 de En. de 2016
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!