Vectorization of nested for loops
Show older comments
hi, This is Pinaki. I am having a problem regarding the code execution time. The following code is taking almost 54 % of total run time to execute. Pls help me to victorize the following codes.
for m = 1:nbus
for n = 1:nbus
if m ~= n
Sij(m,n) = Vm(m)*conj(Iij(m,n))*BMVa;
end
end
end
Thanks, Pinaki
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices 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!