フィルターのクリア

multiplication of matrices with different sizes

4 ビュー (過去 30 日間)
Sara
Sara 2022 年 12 月 14 日
コメント済み: Sara 2022 年 12 月 14 日
i have to calculate the SINR ratio for zero forcing precoding in cell free mmimo i tried to reperesent the part with red mark under it like that ( pilot contamination part)
M=20
K=10
G=M*K matrix
betta=M*K matrix
C=conj(G);
o=G.';
p= zeros(M,1);
for m=1:M
p(m)=(BETAA(m).*(1-((G(m)/BETAA(m)))) ;
end
PC=(abs(p)).^2;
s=zeros(M,1) ;
for m=1:M
s(m)=(inv(C*o).*o.*PC.*inv(C.*o).*C); % thefinal vector
end
etta = m*1 vector
the code give error on s(m) that said 'matrix dimensions must agree'
what is the wrong with this code ? did i repesent these matrix right ? and how can i do multiplication of matrices with different sizes

回答 (1 件)

VBBV
VBBV 2022 年 12 月 14 日
Use a cell array for s
s{m}=(inv(C*o).*o.*PC.*inv(C.*o).*C);
  4 件のコメント
VBBV
VBBV 2022 年 12 月 14 日
You can follow this approach
M=diag(ones(20,1));
K=20;
G=M*K;
betta=M*K;
C=conj(G);
o=G.';
p=zeros(length(M),length(M));
for m=1:length(M)
p(m,m)=betta(m,m)*(1--G(m,m)/betta(m,m)) ;
end
PC=(sum(p)).^2;
% % s=zeros(M,1) ;
for m=1:length(M)
s{m}=(inv(C*o).*o.*PC(m).*inv(C.*o).*C); % thefinal vector
end
s.'
ans = 20×1 cell array
{20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double} {20×20 double}
Sara
Sara 2022 年 12 月 14 日
Thanks for your efforts i will try this

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

カテゴリ

Help Center および File ExchangeAnalog Input and Output についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by