フィルターのクリア

How to multiply matrices using for loop?

1 回表示 (過去 30 日間)
Reinhardt RADING
Reinhardt RADING 2021 年 1 月 5 日
コメント済み: Reinhardt RADING 2021 年 1 月 6 日
Hello there,
i would like to mutiply three matrices.
i have an array which has stored 100 different values of the three matrices. i.e
y1 =x.out(:,:,1); x1=x.db(1); w1=diag(fastexp(x1));
y2=x.out(:,:,2); x2=x.db(2); w2=diag(fastexp(x2));
. . .
. . .
y100=x.out(:,:,100); x100=x.db(100) w100=diag(fastexp(x100));
z=y1 * w1* y1' * y2 * w2 * y2' * y3 * w3 * y3' * .........................................* y100 * w100* y100'
Kindly assist.
Thanks in advance.
  2 件のコメント
David Hill
David Hill 2021 年 1 月 5 日
What are the sizes? What is fastexp()?
Reinhardt RADING
Reinhardt RADING 2021 年 1 月 5 日
fastexp() is for calculating the exponential of x1.
y1 = 1x2
w1 = 2x2
y1' = 2x1

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

採用された回答

Stephen23
Stephen23 2021 年 1 月 5 日
編集済み: Stephen23 2021 年 1 月 5 日
z = 1;
for k = 1:100
y = x.out(:,:,k);
w = diag(fastexp(x.db(k)));
z = z * y * w * y';
end
  1 件のコメント
Reinhardt RADING
Reinhardt RADING 2021 年 1 月 6 日
This worked.
Your assistance was highly appreciated. Thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by