CAT arguments dimensions are not consistent.

9 ビュー (過去 30 日間)
Stelios Fanourakis
Stelios Fanourakis 2017 年 9 月 17 日
コメント済み: Walter Roberson 2017 年 9 月 17 日
MM=zeros(size(m,1),size(Y,2)); % RTS Smoother
PP=zeros(size(m,1),size(m,1),size(Y,2));
for k= 1:size(Y,2)
Z(k)=[m;P];
D(k)=kf_upd(X,K,P);
MM(:,k)=Z;
PP(:,:,k)=D;
end
plot(MM,PP);
  3 件のコメント
per isakson
per isakson 2017 年 9 月 17 日
編集済み: per isakson 2017 年 9 月 17 日
Z(k) is a scalar and [m;P] is a column vector (or an array). A scalar is not consistent with a row. Maybe you intended Z(:,k). However, that is less likely because it would cause problems with MM(:,k)=Z;
Walter Roberson
Walter Roberson 2017 年 9 月 17 日
Z appears to be growing in length for each iteration, but in the line
MM(:,k)=Z
you are assigning all of Z to a row of MM. With Z growing but MM not having its columns expanded, you are going to have problems.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by