tT=zeros(285,3);
Wnlms=zeros(3,285);
est_yn(n)= tT * WnlmsT;
whats wrong with the 3rd statement, why i cant perform this multiplication. don't confuse it that i initialize these two arrays as having zeroes on all positions, but while my algorithm will run then these both arrays have values.i just stuck at this 3rd statement. it says have this error {In an assignment A(I) = B, the number of elements in B and I must be the same.
Error in Tying_To_ReadFromFile (line 34) est_yn(n)= tT * Wnlms;}

 採用された回答

Jan
Jan 2017 年 4 月 12 日
編集済み: Jan 2017 年 4 月 12 日

1 投票

You assume, that the multiplication is the problem, buit the error message tells you, that the assignment ist the problem.
Use the debugger to find out, what happens. Set a breakpoint in the line. Then start the code and when it stops check the sizes of the variables:
size(tT)
size(WnlmsT)
size(tT * WnlmsT);
size(est_yn(n)) % assuming that est_yn is pre-allocated
You will see, that the right hand side of this assignment is a matrix, while the left hand side is an scalar.

1 件のコメント

Motasim  Masood
Motasim Masood 2017 年 4 月 13 日
Yes you are right. thank you.

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

その他の回答 (0 件)

カテゴリ

質問済み:

2017 年 4 月 12 日

コメント済み:

2017 年 4 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by