i want to give de_e a shape of matrix of order 100x400 how can I?. I want output to be in order of j1xj2 rows and k1xk2 rows.Thanks

1 回表示 (過去 30 日間)
for iteration = 1:length(N) % Iterations
nn=N(n);
for irs1 = 1:(L-1) % IRS1 to be multiplied
for j1 = 1:element % row of 1st IRS
for k1 = 1:(nn/10) % column of 1st IRS
for irs2 = (irs1+1):L % IRS2 to be multiplied
for j2 = 1:element % row of 2nd IRS
for k2 = 1:(nn/10) % column of 2nd IRS
de_e(irs1,j1,k1,irs2,j2,k2,iteration) = sqrt(((x_e(j2,k2,irs2,iteration)-x_e(j1,k1,irs1,iteration))^2)+((y_e(j2,k2,irs2,iteration)-y_e(j1,k1,irs1,iteration))^2));
he_e(irs1,j1,k1,irs2,j2,k2,iteration)=(sqrt(alpha)./(de_e(irs1,j1,k1,irs2,j2,k2,iteration))).*(exp(-1j*(2*pi*de_e(irs1,j1,k1,irs2,j2,k2,iteration))./lambda));
end
end
end
end
end
end
end

採用された回答

Benjamin Thompson
Benjamin Thompson 2022 年 2 月 2 日
To create a matrix with the 100 by 400 size, use the command:
de_e = zeros(100,400);
I am not sure what you mean by j1xj2 rows nad k1xk2 rows.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLanguage Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by