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
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