Hi. How I can write this formula with Matlab code?

2 ビュー (過去 30 日間)
Aynur Resulzade
Aynur Resulzade 2023 年 1 月 20 日
編集済み: Aynur Resulzade 2023 年 1 月 23 日
  2 件のコメント
Rik
Rik 2023 年 1 月 21 日
That depends on what psi is, but with a nested loop this is trivial. What did you try?
Aynur Resulzade
Aynur Resulzade 2023 年 1 月 22 日
編集済み: Aynur Resulzade 2023 年 1 月 22 日
psi is 2x2 matrix which is depend on n psi(n)=(A11(n) A12(n);A21(n) A22(n))

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

回答 (1 件)

Bruno Luong
Bruno Luong 2023 年 1 月 21 日
n=10;
psi=rand(1,n-2);
chi = 0;
for k=1:n-2
i = nchoosek(1:n-2,k);
j = 1:k;
l = k+1-j;
il = i(:,l);
chi = chi+sum(prod(psi(il),2));
end
chi
chi = 11.2726
% Or remove some of the unecessary indexing with j and l
chi = 0;
for k=1:n-2
chi = chi+sum(prod(psi(nchoosek(1:n-2,k)),2));
end
chi
chi = 11.2726
  4 件のコメント
Bruno Luong
Bruno Luong 2023 年 1 月 23 日
編集済み: Bruno Luong 2023 年 1 月 23 日
@Aynur Resulzade You must kidding me. I'll delete my answer
Aynur Resulzade
Aynur Resulzade 2023 年 1 月 23 日
編集済み: Aynur Resulzade 2023 年 1 月 23 日
@Bruno Luong please excecuse me
Sorry I ask second time this question for 2x2 matrix where fi
admin say that you must ask for this in after question and didnt accept answer
that is way I unaccept ((((((
please help me for this problem and don't angry)))

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

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by