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 view (last 30 days)
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

Accepted Answer

Benjamin Thompson
Benjamin Thompson on 2 Feb 2022
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.

More Answers (0)

Categories

Find more on Language Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!