Is there a way to write these sentences without for loop?

1 view (last 30 days)
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
Aparna Singh
Aparna Singh on 29 Apr 2020
okay that is a great suggestion. i will look into it!

Sign in to comment.

Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!