フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Jus a simple expression (easy question)

1 回表示 (過去 30 日間)
Paul Rogers
Paul Rogers 2020 年 5 月 9 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi guys, I am just having some iussues with this formula, could some one please help me?
n=5, r=5.
  2 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 5 月 9 日
What is M? How is defined? How is defined?
Paul Rogers
Paul Rogers 2020 年 5 月 9 日
編集済み: Walter Roberson 2020 年 5 月 10 日
M doesn't matter, let's say aij is this matrix.
a =
1.7151 -0.1511 -0.0371 -0.0457 0.0323
0.5975 -0.0172 -0.0483 -0.0186 0.0064
0.0948 -0.0027 -0.0076 -0.0029 0.0010
0.0266 0.0003 -0.0032 -0.0009 0.0001
0.0064 0.0003 -0.0009 -0.0002 0.0000
Ti= cos(icos^-1(i))
Tj= cos(icos^-1(j))
n=5
r=5

回答 (1 件)

Ameer Hamza
Ameer Hamza 2020 年 5 月 9 日
Try this
a = [...
1.7151 -0.1511 -0.0371 -0.0457 0.0323
0.5975 -0.0172 -0.0483 -0.0186 0.0064
0.0948 -0.0027 -0.0076 -0.0029 0.0010
0.0266 0.0003 -0.0032 -0.0009 0.0001
0.0064 0.0003 -0.0009 -0.0002 0.0000];
n=5;
r=5;
i = 0:r-1;
j = 0:n-11;
Ti= cos(i.*acos(i));
Tj= cos(i.*acos(i));
result = sum(a.*Ti.'.*Tj, 'all')
Result
result =
54.6082
  4 件のコメント
Walter Roberson
Walter Roberson 2020 年 5 月 10 日
Is the for j=r correct? Should it be for j=1:r ?
Ameer Hamza
Ameer Hamza 2020 年 5 月 10 日
Thanks for correction. It should be 1:r

この質問は閉じられています。

製品


リリース

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by