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
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!