フィルターのクリア

Problems with exp-functions

1 回表示 (過去 30 日間)
Alexander Engman
Alexander Engman 2016 年 1 月 23 日
コメント済み: Alexander Engman 2016 年 1 月 23 日
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?

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 1 月 23 日
f=2*x.*exp(-x);
  1 件のコメント
Alexander Engman
Alexander Engman 2016 年 1 月 23 日
Thanks, I figured it out!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by