What's wrong with the folow expression?

Matlab don't accept y=exp(-x)+exp(-0.5*x)*(-0.5*cos(3*x)-3*sin(3*x))
Error using * Inner matrix dimensions must agree.
what's wrong with this?

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 2 日

0 投票

Use .*
x=0:10
y=exp(-x)+exp(-0.5*x).*(-0.5*cos(3*x)-3*sin(3*x))

その他の回答 (0 件)

カテゴリ

質問済み:

2013 年 12 月 2 日

コメント済み:

2013 年 12 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by