フィルターのクリア

Error using * Inner matrix dimensions must agree

1 回表示 (過去 30 日間)
ding xian zhi
ding xian zhi 2017 年 3 月 19 日
編集済み: per isakson 2017 年 3 月 19 日
y=cos(x).*[0.5+(3*sin(x))./(1+x*x)]
Error using *
Inner matrix dimensions must agree.
I want to know where is the problem could anyone help me thx

採用された回答

GEEVARGHESE TITUS
GEEVARGHESE TITUS 2017 年 3 月 19 日
In the last part of the relation you are trying to do x*x, which is not possible. You should either use a dot operator or you need to transpose one of the x.
x=1:10;
y1=cos(x).*[0.5+(3*sin(x))./(1+x.*x)]
y2=cos(x).*[0.5+(3*sin(x))./(1+x*x')]

その他の回答 (0 件)

カテゴリ

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