Problem 762. Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1];
yc = [1 2 1; 3 2 4];
A = [6 7 8 9; 10 11 12 13];
Produce the matrix B which contains the values of A at the locations given in xc and yc. Thus:
B = [6 7 6; 12 11 9];
Solution Stats
Problem Comments
-
2 Comments
Andrew
on 28 Jan 2014
It needs more than one test
Gareth Lee
on 18 Apr 2015
agree! it is easy to cheat!
Solution Comments
Show commentsProblem Recent Solvers235
Suggested Problems
-
Remove the polynomials that have positive real elements of their roots.
1725 Solvers
-
Find the sum of the elements in the "second" diagonal
1174 Solvers
-
Getting the row and column location from a matrix
293 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1214 Solvers
-
282 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!