I have an initialized 2D Float array as follows:
proj_img = zeros(1024,1024)
I have another 2D Float array contain a specific row and column location as follows:
pix_vis_locs= [621 1 622 2 623 3 624 4 625 5 ]
The first column is corresponding to row location and second column corresponding to the column location of first matrix
proj_img. I am trying to update the values of specified indices of
proj_img as follows similar to MATLAB:
proj_img[pix_vis_locs[:,1],pix_vis_locs[:,2]] .= 1
sum(proj_img)==5 but I got
25. Then I realized that this method updates all combination of row and columns.
But I need to update values only in above mentioned 5 indices. How can I do that?
Thanks in Advance !!