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 CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by