Matrix evaluation at a collection of indices
Show older comments
Hello,
I would like to do multiple matrix evaluations without the use of a loop. In particular, suppose Z is a p-by-q matrix, and X and Y are m-by-n integer-valued matrices.
I would like to construct an m-by-n matrix U defined as
U(i,j) = Z(X(i,j),Y(i,j))
Is there a simple way to do this without using the loop? Thanks a lot!
Accepted Answer
More Answers (0)
Categories
Find more on Sparse 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!