suppose I have an array A with size (n,m) and an array B with size (n,l), with l<m.
Suppose elements of array B point to elements of array A in the following fashion:
What is the fastest way to substitute all elements of A that are pointed by elements of B with a given value? At present I am using for loops but I guess they are not very efficient.
Also, would it be different if matrix A would be generated by repetition of the same known row n times?
Thanks a lot for any help or hint you are willing to give!!