Is there a way to write these sentences without for loop?
1 view (last 30 days)
Show older comments
Hi I am trying to vectorize for loop in this question to make my code run faster. Here is the for loop. Is there a way I can write B_new without the for loop?
tof_pix1 = flatten_tof(pix:pix+127)';
for j=1:128
B_new(1:numsamps-tof_pix1(j)+1,j)=nr(tof_pix1(j):end,j);
end
3 Comments
Answers (0)
See Also
Categories
Find more on Logical 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!