Error using * inner matrix dimension must agree?

Error using * Inner matrix dimensions must agree.
Error in FPAeld1 (line 35)
F=Pi.*Pi*a1+Pi*b1+c1+mod(ei*sin.*(fi*(pmin-Pi)))

2 件のコメント

Kajal Chanchalani
Kajal Chanchalani 2018 年 8 月 2 日
編集済み: Walter Roberson 2018 年 8 月 2 日
xw=xn.*exp(-j*(w*n'));
Inner dimensions matrix must agrre . This is the error that i am getting
Walter Roberson
Walter Roberson 2018 年 8 月 2 日
In that code, size(w,2) would have to equal size(n,2) unless one of w or n is a scalar. size(j,2) would have to match size(w,1) unless one of j or (w*n') is a scalar.

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

回答 (1 件)

Steven Lord
Steven Lord 2015 年 9 月 9 日

0 投票

In addition to Star Strider's comment, you have a variable named sin in your workspace but I suspect you wanted to instead call the SIN function. If so, clear the variable named sin from your workspace and remove the .* between sin and the following parenthesis in your code.
If you've defined your own Pi function, that's not really necessary either; just call the PI function like in this example.
y = sin(0:0.1:2*pi);

1 件のコメント

Star Strider
Star Strider 2015 年 9 月 9 日
Thank you. Overlooked that.

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

カテゴリ

ヘルプ センター および File ExchangeStructures についてさらに検索

タグ

質問済み:

2015 年 9 月 9 日

コメント済み:

2018 年 8 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by